469,085 Members | 1,007 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,085 developers. It's quick & easy.

Help With Font Objcet

hi all.
i have a grid ocx i'm using, and i have to set it's font
to an integer value returning from a font object.
when i wrote : Dim f As System.Drawing.Font
al it's propertys are readonly.
how can i set it's Bold,Underline etc..

Nov 21 '05 #1
1 994
You must specify the new styles / etc in the constructor

This would give you a reference to a new font based on the same font as the
containing form, but bold and italic (Assuming Me is a Form or has a Font
property returning a font):

Dim boldItalicFont as new System.Drawing.Font( Me.Font, FontStyle.Bold or
FontStyle.Italic)
See other overloads of the Font constructor for more options.
--
-Philip Rieck
http://philiprieck.com/blog/

-
"shachar" <an*******@discussions.microsoft.com> wrote in message
news:1f****************************@phx.gbl...
hi all.
i have a grid ocx i'm using, and i have to set it's font
to an integer value returning from a font object.
when i wrote : Dim f As System.Drawing.Font
al it's propertys are readonly.
how can i set it's Bold,Underline etc..

Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by martingerber | last post: by
2 posts views Thread by Jackson Yap | last post: by
5 posts views Thread by Craig Keightley | last post: by
7 posts views Thread by Ladysniper | last post: by
2 posts views Thread by droskies420 | last post: by
1 post views Thread by lilbit02 | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by kglaser89 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.