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

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,077
Latest member
SangMoor21

Latest Threads

Top