Visual Basic .NET Forums  
Click here to advertise with us

Go Back   Visual Basic .NET Forums > VB.NET > Windows Forms

Windows Forms Discussion related to Winforms application development

VB.NET Forums Newsletter Signup:
Email address:


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-06-2009, 5:39 PM
VB.NET Forum Enthusiast
.NET Framework: .NET 3.5 (VS 2008)
 
Join Date: Sep 2008
Posts: 83
Reputation: 46
daveofgv will become famous soon enoughdaveofgv will become famous soon enough
Question Label question

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 11-10-2009, 6:08 AM
jmcilhinney's Avatar
VB.NET Forum Moderator
.NET Framework: .NET 3.5 (VS 2008)
 
Join Date: Aug 2004
Location: Sydney, Australia
Age: 40
Posts: 6,006
Reputation: 538
jmcilhinney VB.NET gold medalistjmcilhinney VB.NET gold medalistjmcilhinney VB.NET gold medalistjmcilhinney VB.NET gold medalistjmcilhinney VB.NET gold medalistjmcilhinney VB.NET gold medalistjmcilhinney VB.NET gold medalistjmcilhinney VB.NET gold medalistjmcilhinney VB.NET gold medalistjmcilhinney VB.NET gold medalistjmcilhinney VB.NET gold medalist
Default

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





All times are GMT -4. The time now is 11:28 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2


For advertising opportunities click here.