Customizing Label control

  • Thread starter Thread starter Jason
  • Start date Start date
J

Jason

Using VB.NET - I have a label on a form. The label.Text is "Test Label". Is
there a way to make the word "Test" bold and the word "Label" not bold?
Overriding OnPaint worked, but I am having trouble with the rendering out of
the text. Can this be done? Thanks, Jason.
 
* "Jason said:
Using VB.NET - I have a label on a form. The label.Text is "Test Label". Is
there a way to make the word "Test" bold and the word "Label" not bold?
Overriding OnPaint worked, but I am having trouble with the rendering out of
the text. Can this be done?

You will have to render the text yourself, what you want to do is not
supported by the label control "out of the box".
 
I think the simplest way is to use two labels with different font styles
(normal and bold), one for the word 'label' and the other for the word
'text'.
 
Back
Top