Label question

daveofgv

Well-known member
Joined
Sep 17, 2008
Messages
218
Location
Dallas, TX
Programming Experience
1-3
I have a label which is connected to my.settings file. I need it to type from center out, however, right now is types from left to right. Since the user will type their name in a text box on one from (that is connected to the same settings file) it will appear on another form with the label.

I tried textalign property, but that does not do the trick.

I need it (label) to be like center align in word where the cursor automatically goes to the center of the page.

That way everything is even from center out. I need it to make the center of their name always center of the form.

Hope everyone understands what I am trying to ask.....

Thanks in advanced

daveofgv
 
Last edited:
Setting the TextAlign to one of the Center values is exactly what you need to do. The thing is, you probably haven't changed the AutoSize property from its default of True. As it stands the upper left corner of the Label will stay exactly where it is and, as the Text grows in length, the Label gets wider. The centre of the Text is always in the centre of the Label, exactly as you're asking for. The problem is that the centre of the Label is moving.

In order to get the appearance you want you need to set AutoSize to False so that the Width of the Label is constant.
 
Back
Top