Welcome Guest Search | Active Topics | Sign In | Register

Change Font Family For Edit Control portion of Date Picker Options
PDG
Posted: Wednesday, September 28, 2011 3:03:59 PM
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.
eo_support
Posted: Wednesday, September 28, 2011 4:32:23 PM
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!

PDG
Posted: Thursday, September 29, 2011 10:39:02 AM
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;";

eo_support
Posted: Thursday, September 29, 2011 11:53:33 AM
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.aspx

Thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.