![]() |
Click here to advertise with us
|
|
|||||||
| Windows Forms Discussion related to Winforms application development |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
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 by daveofgv; 11-06-2009 at 5:48 PM. |
|
||||
|
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.
__________________
![]() 2007, 2008, 2009, 2010 Why is my data not saved to my database? | Communicating between multiple forms MSDN: Data Walkthroughs | "How Do I?" Videos My Blog: Custom Events | Dynamic GDI+ Drawing |
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|