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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Vertical alignment in TextBox ? 1

Status
Not open for further replies.

bfwriter

Technical User
Jul 22, 2006
35
US
Hi Guys,

Is there any way to vertically center the text in an increased-height textbox (as is routinely done in grid header captions)?

Under unusual circumstances, for special effects, I like to increase the height of a textbox; but when that is done, the text line stays attached to the top margin.

TIA
Bill
 
Hi Bill,

Not that I know of.

How about using 2 textboxes on top of each other, setting the BorderStyle of the top textbox to 0 so the two look like a single textbox. Then you increase the height of the bottom one and set the top textbox vertically aligned central to the bottom textbox?

Alternatively a textbox over a shape object.

Hope that helps,

Stewart
PS If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Use and Editbox and set the Scrollbar property to None.

Craig Berntson
MCSD, Visual FoxPro MVP, Author, CrysDev: A Developer's Guide to Integrating Crystal Reports"
 
An interesting question bfwriter.

You can't use the margin, because that effects the horizontal placement as well as the vertical.

The editbox doesn't work either, because the scrollbars don't effect the placement of the text.

I would think Stuart's idea is the only workable one.

If it was a button, you could mess with the caption positioning - but not for a text box!

Good luck

Regards

Griff
Keep [Smile]ing
 
Hi,

Maybe you could also implent the function "v1"

Please try:
Code:
myAvatar = "Jockey 2"
? myAvatar function "v1"
Regards,

Jockey(2)

jockey.gif
 
Many thanks, guys.

Stewart's suggestion is exxxcellent, and should be a good work-around for those few times I need it.

Thanks again.

Bill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top