Setting a margin in a label

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a way to set the margins in a label.

Specifically, what I need to do is make sure that the text begins 6 pixels
to the left of the label border and that the baseline of the text is 5
pixels above the lower border of the label.

Is there any way to accomplish this with the standard label or am I going to
have to create my own label control?

Thanks.

Pete Davis
 
* said:
Specifically, what I need to do is make sure that the text begins 6 pixels
to the left of the label border and that the baseline of the text is 5
pixels above the lower border of the label.

Is there any way to accomplish this with the standard label or am I going to
have to create my own label control?

That's not supported by the standard label, but you can create a control
that inherits the label and overrides its 'OnPaint' method. There you
can place your custom drawing code.
 

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