Bug: Labels and textboxes clip characters

B

Bob Graham

There is a bug that causes labels to clip a bit of the last character when
you choose right alignment. So I switched to using a textbox with backcolor
= control, borderstyle = none, to make it look like a label.

This variation causes the bottom of letters with lower sections like "p" to
be clipped!!!

Is this such a hard thing for MS to get right? The most basic two controls
you could possibly put on a form!

Does anyone know a work-around to get labels to right-align without clipping
characters? I'd rather give up on the text box idea for now, and get labels
to behave.

Thanks, Bob
 
H

Herfried K. Wagner [MVP]

* "Bob Graham said:
There is a bug that causes labels to clip a bit of the last character when
you choose right alignment. So I switched to using a textbox with backcolor
= control, borderstyle = none, to make it look like a label.

This variation causes the bottom of letters with lower sections like "p" to
be clipped!!!

That's a "known" bug (I assume in GDI+). Setting the control's
'FlatStyle' property to 'System' is a workaround.
 
B

Bob Graham

Herfried,


Herfried K. Wagner said:
That's a "known" bug (I assume in GDI+). Setting the control's
'FlatStyle' property to 'System' is a workaround.


I'm sorry, is that a work-around for the label control or the text box
control?

The work-around (read kludge) that I've found that works well for the label
control is to add a newline character in the win-forms generated code: -->
labelname.text = "text" & chr(13)

This seems to work real well.

Bob
 

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

Top