PDA

View Full Version : DateChooser Component - Cannot Set Text Parameters


BullFrawg
03-14-2005, 07:39 AM
the docs say I can set the text on the DateField component and then set HeaderDateText separately, however, any time I try to set the regular text in the DateField component it overrides whatever I set for the HeaderDateText.

For example, what I really want is regular text to be 12pt and my header text to be 16pt. If I set my header text as shown below, my header changes as expected,

_global.styles.HeaderDateText.setStyle("fontSize", "16");

But, when I then attempt to set the regular text of the component with this statement,

myDC.setStyle("fontSize", "12");

the header AND the regular text take on the value of 12pt.

Is there any way to set the header text independently from the regular text?

SrinivasSM
03-15-2005, 04:59 AM
Hi,
Instead of Whatever u have used use the bellow code it works:


myDC.setStyle("fontSize","12")
myDC.dateDisplay.setStyle("fontSize","16")


I have Tried this and it works.Here myDC must be ur dateChooser Instance Name.

BullFrawg
03-15-2005, 06:40 AM
SrinivasSM,

THANK YOU!!!!

If you don't mind, 2 more questions...

1) where is this documented?

2) how do I set the DayOfWeek text (S M T W T F S)?

SrinivasSM
03-15-2005, 09:10 AM
Hi,

Oops Guy.For First Question I can't answer cauz it's something which u need to browse through all class files.
For second Question u can Just set as bellow

myDC.dayNames=["Sun","Mon","Tue","Wed","Thur","Fri","Sat"]

BullFrawg
03-15-2005, 07:11 PM
No, I mean how do I set the DayOfWeek header text style? (font size, color, etc.)

Bascially I'd like to set the styles (font size, color, etc.) for the header, the day of week header, and the main calendar text all separately. I know how to set the main text and you showed me how to set the header but what about the day of week header styles? can they be set separately?

Thanks again.

SrinivasSM
03-16-2005, 06:18 AM
Hi

You can't set DayOfWeek header Text Style separately cauz this and dates are packed inside a single grid so setting style would depict on the whole grid.I will still Try on this ,if i could get the result i will notify you.ok

falasa
09-01-2005, 04:39 AM
Hi, BullFrawg,

This is what you want to know.

http://www.longoes.com/showByID.aspx?id=7&cat=1

the docs say I can set the text on the DateField component and then set HeaderDateText separately, however, any time I try to set the regular text in the DateField component it overrides whatever I set for the HeaderDateText.

For example, what I really want is regular text to be 12pt and my header text to be 16pt. If I set my header text as shown below, my header changes as expected,

_global.styles.HeaderDateText.setStyle("fontSize", "16");

But, when I then attempt to set the regular text of the component with this statement,

myDC.setStyle("fontSize", "12");

the header AND the regular text take on the value of 12pt.

Is there any way to set the header text independently from the regular text?