Font Underline property

  • Thread starter Thread starter Aleksey
  • Start date Start date
A

Aleksey

Help!!!!!!!
It's not trivial to change Underline property for Label font in runtime.
This property is read only in Font class!?!?!
Is anybody knows how to do that?

Thanks a lot
 
Something like:
Font prototype = label1.Font;
label1.Font = new Font(prototype, prototype.Style | FontStyle.Underline);

Marc
 
Aleksey said:
Help!!!!!!!
It's not trivial to change Underline property for Label font in runtime.
This property is read only in Font class!?!?!
Is anybody knows how to do that?

Basic steps are to create a new font from your existing font, adding the
underline style to it and then setting the new font as the font for your
control. It's not really that difficult, but you can't simply modify that
style of an existing font in place.
 
Back
Top