Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Center text in a text box

Status
Not open for further replies.

dvannoy

MIS
May 4, 2001
2,765
0
0
US
Real Stupid question...how do you center text in a text box???

thanks dvannoy@onyxes.com
 
Use the Alignment property of the box and set it to Center.
 
The textbox control has a property called alignment which can be set to 0, indicating left alignment, 1, indicating right alignment, or 2, indicating center alignment.


Hope this helps!
Josh
 
sorry, im so stupid...didnt even notice that.. dvannoy@onyxes.com
 
My first instructor in VB started out the class by saying that the purpose of the class wasn't for us to learn everything there was to learn about VB, but rather to learn HOW TO LEARN about VB. Rule number one was "If you want a control to do something, look at the property box first". It's not a question of being stupid, just being inexperienced. "It's got to be the going,
not the getting there that's good!"
-Harry Chapin
 
ok,,why will it only work on some of my text boxes??

I have tryed setting the center property in the properties windows and also in code..some of these text boxes are a little small so i dont know if that has anything to do with it..

Thanks dvannoy@onyxes.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top