Custom Control: FONT Collection

R

Ryan

I have a custom control and would like to give it a property like the
WebControl class's FONT property. I created the following importing
from System.Drawing


Public Property HeaderFont() As Font
Get
Return fntHeaderFont
End Get
Set(ByVal value As Font)
fntHeaderFont = value
End Set
End Property

Where I declare my font to be:

Private fntHeaderFont = New Font("", 12, FontStyle.Regular,
GraphicsUnit.Point)

This works, but does not give me the same font property that the web
control does. Most notably absent is the names (plural) property.
Should I be importing the font object from somewhere else? I see the
webcontrol has a fontinfo object, but this is readonly so I have no
idea how to make use of it to set font attrivutes at design time.

Any help would be appreciated.

Thanks,
Ryan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,034
Messages
2,570,356
Members
47,002
Latest member
RobertoLip

Latest Threads

Top