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

how to vertically align text in text box???

Status
Not open for further replies.

mrweatherbee

Programmer
Jul 5, 2001
11
US
This seems like it should be simple, but I just can't figure it out...I have a text box on a form and report that I want to vertically align in the center, but I just can't find the control or commmand or any code to figure out how to do this? an example:

If anyone can help me out with this i'd appreciate it...thanks!

if i had a text box like

___
|
|
___|

i want the text to appear like this
___
|
x |
___|

rather than this

___
x |
|
___|

hopefully that made sense... thanks for your help!

mr.w
 
Dear Mr. W:
One way to do it would be to use the "Top Margin" property on the property sheet for the control. I frequently use left and right margins of 0.0299" to bring the displayed text in from the sides--top margin should work the same way.
Hope this helps you,
:) Gus Brunston
An old PICKer
padregus@home.com
 
gusbrunston--i had never seen that feature so just went to look and darn if i don't see what you mean? there is TOP and LEFT for a text box, but that is just for its placement on the form.

mr. w--is the text in there always only one row high (or i mean the same height all the time?) or does it vary?

g
 
the height of the text in the box (which is actually about 5 or 6 text lines high?) will likely vary, which is what makes it difficult? otherwise i could have just used some kind of margin maybe. anyways, any help would be greatly appreicated.
 
Hi, GingerR
Maybe it's not in your version, but in Access2000 there's a property called "Top Margin" which will do what Mr. W indicated he wanted to do. So, if he has Access2000 or later, it's there. However, with a varying number of lines of text...I think he's going about something the wrong way.
:) Gus Brunston
An old PICKer
padregus@home.com
 
Mr. W:
I've never used it, but there is a property for a control called, Can Grow. Why don't you try letting that expand the control to fit whatever text you need to display?
:cool: Gus Brunston
An old PICKer
padregus@home.com
 
hmmm, well the only problem with that is that i'm doing a from that will create a cover page report, so everything has to fit in a certain spot on the page and it has to be one page...so basically, it's like if i used CanGrow then i'd have to set it up on the form and report like this:


[Title Box]
[Agency Box]




[Date Box]


so if the agency name filled up 5 lines of text, it would be fine, cos it would grow to fill up that white space before the date
like:

Title
Agency
Agency
Agency
Agency
Agency
Date

and look fine...but say it only filled one line of text, it would look like:

Title
Agency




Date

which wouldn't be cool cos of too much white space! i want it end up in this case like:

Title


Agency


Date


Again, this is kind of confusing, so i hope it makes sense...but again, any help would be appreicated...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top