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.
 

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

Back
Top