Private m_Font As Font = New Font("arial", 8.0!, FontStyle.Regular, _
GraphicsUnit.Point)
Public Property [Font]() As Font
Get
Return m_Font
End Get
Set(ByVal Value As Font)
m_Font = Value
End Set
End Property
Private Function ShouldSerializeFont() As Boolean
Return Not (m_Font.SizeInPoints = 8.0! AndAlso _
m_Font.Style = FontStyle.Regular AndAlso _
m_Font.Name.ToLower = "arial")
End Function
Private Sub ResetFont()
m_Font = New Font("arial", 8.0!, FontStyle.Regular, _
GraphicsUnit.Point)
End Sub
--
Mick Doherty
http://dotnetrix.co.uk/nothing.html [quoted text, click to view] "Nick WAELTI" <nick@waelti.net> wrote in message
news:eXxzaDwUFHA.2124@TK2MSFTNGP14.phx.gbl...
> Hi,
>
> Does anyone knows how to set a default for a font property ?
>
> I want my property to have the default (not bold) on Arial 8.0! Regular.
> How can I achieve that ?
>
> Thanks,
> Nick