Rank: Advanced Member Groups: Member
Joined: 12/19/2010 Posts: 47
|
Is there any way to change the Font Family in the edit control portion of the date picker? It uses some ugly font that appears differently on all my forms.
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
Yes. You will need to modify the DatePicker's PickerStyle property. That property controls the textbox styles.
Thanks!
|
Rank: Advanced Member Groups: Member
Joined: 12/19/2010 Posts: 47
|
I will be a tad more specific here. The Font property in the pickerstyle is read only so here is what I did:
dp.PickerStyle.CssText = "font: normal small Arial, Helvetica, sans-serif";
That did set the correct font.
Now for another question, how do you set the font in the MaskedEdit Control?? I have tried the following and both fail:
me.Style.Add("font", "normal Arial, Helvetica, sans-serif"); me.CssBlock = "font:normal Arial, Helvetica, sans-serif;";
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi, The Font property is read only but its child properties are not. So it will be something like this: dp.PickerStyle.Font.Name = "Arial"; Setting CssText will also work fine. It's even more efficient because it can set all the properties in a single call. With MaskedEdit control, you do the same thing with this property: http://doc.essentialobjects.com/library/1/eo.web.maskededit.textboxstyle.aspxThanks
|