PDA

View Full Version : DateField Windows Issue


SrinivasSM
03-14-2005, 06:48 AM
Hi Everybody,

I Need A Help.Can Anybody Tell Me How Can I Customize the Window Size of the DateField Component.I mean the Drop Down Window showing Date's is very large, I want it to Customize to What ever width and Height I want.
And also I want to Add a Button Called Today inside it,When on Click I want to push the today's date in the Field else I want Push the selected Date into the field.and i Want to completely Remove or Disable the Property of "todayColor".Please Suggest Me methods.


-Srinivas S.M

SrinivasSM
03-14-2005, 11:12 AM
Hi,

I Hope No body Knows.I have tried myself.This is what u need to do.

you can change the size of this dropDown area with:CODE :
myDateField.pullDown.setSize(150,150);
Then You might have to adjust the font size with:CODE :
DateField.setStyle('fontSize',10);

SrinivasSM
03-14-2005, 11:13 AM
Regarding Adding another Button inside it,
you can do that as follows:
'clip' is the MovieClip with button:


CODE

listenerObject = new Object();
listenerObject.open = function(eventObject){

myDateField.pullDown.attachMovie("clip","clip1",100);

//set the position of the button as you need
myDateField.pullDown.clip1._x=myDateField.pullDown .background_mc._width;
myDateField.pullDown.clip1._y=myDateField.pullDown .background_mc._height;

//Button action
myDateField.pullDown.clip1.myButton.onRelease=func tion(){
_root.myDateField.selectedDate=new Date();
_root.myDateField.selectedDate.getDate();
}

}
myDateField.addEventListener("open", listenerObject)