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!

Centering Text in Button 1

Status
Not open for further replies.

Bloobird

Programmer
Oct 23, 2001
49
0
0
GB
Hi - Am I being stupid here ? I have a button with text on it which goes over 2 lines - I want this text centered rather than Left justified -how can I do this ?

Thanks
 
in the properties box for the button there is a property for setting the text to justify-center.
 
I believe you, but I can't see anything like that in the properties box - what is the property name ?

Thanks
 
This is an option button? I actually don't think there is a way to center the text. There is an alignment property, but that only controls which side of the text the button goes on.

If you want to be tricky, you could try padding your second line of text with spaces at the begining. This will indent it enough to appear centered, although it is a pain in the neck.
 
Here I go again. Instead of trying to force the problem to be solved, Don't.

Make the option button(s) have no text and put label next to it.



Sometimes it is easier to go around the wall than thru it.
This is most often when the wall lacks windows and doors.

Wil Mead
wmead@optonline.net

 
Actually, it was AdaHacker who brought up options. Bloobird has yet to confirm. Since the phrase was "with text ON it", it probably is a command button. So Bloobird, which is it?
 
You would think it was a command button, except that text on command buttons is centered by default, which suggests that either it's some other kind of button, or something is terribly, horribly wrong.
 
Command button text goes left justified if it wraps, and I think that's what Bloobird means by 2 lines.
 
Hullo! Set the style to graphical and the text is centred. Peter Meachem
peter@accuflight.com
 
Sorry guys, I'm running on British time here - yep, it was a Command Button I was having a problem with centering the text on (If it wrapped over 2 lines) - setting the Style property to Graphical solved the problem - Thanks all
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top