471,585 Members | 1,205 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,585 software developers and data experts.

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 1063
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
reply views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by
reply views Thread by Anwar ali | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.