Overline in label

  • Thread starter Thread starter Jon Slaughter
  • Start date Start date
J

Jon Slaughter

is there a simple way to add an overline on the text in a
label/checkbox/radiobutton? Any special chars that can do this similar to
how & works with menus?

Thanks,
Jon
 
Jon,

None that I am aware of, unfortunately. You are going to have to draw
this yourself.
 
Nicholas Paldino said:
Jon,

None that I am aware of, unfortunately. You are going to have to draw
this yourself.

Is there any way to do this efficiently? I can easily add a paint handler
and draw a line over the whole control but with a radio or check it draws it
over the button part too. Either I need to get the position of the text in
the control or determine the button part's width.

Thanks,
Jon
 
Jon,

That's the thing, there is no easy way to do this with Windows controls.
The logic of the components and the parts is all self contained. This is
very different from Windows Presentation Foundation, where you can actually
see the different components of composite controls, usually (the radio
button would have a text element, for example).

For windows controls, you are going to have to redraw the whole control
yourself.

The unmanaged thremes API (this is a link to the starting point):

http://msdn2.microsoft.com/en-us/library/ms649785.aspx

Might help you a little bit, in that you can tell it to draw certain
parts of the control in certain states (and it does separate some of the
parts out for windows controls) but it's still going to entail a great deal
of work.
 
Back
Top