vertical alignment>>>>>>>>>>

K

Krish

Hi!

Can anybody help me how to get vertical alignment text
starting from bottom to top. Thanks in advance.

Krish
 
M

Marshall Barton

Krish said:
Can anybody help me how to get vertical alignment text
starting from bottom to top.

Nothing native in Access for this. However, you can use
Stephen Lebans' TextHeightWidth function (www.lebans.com)
to calculate how much vertical space the text requires.
Using that value, you can then adjust the text box's Height
and Top properties so that the bottom of the text appears at
the desired position.

Dim lngHgt As Long
lngHgt = fTextHeight(Me.thetextbox)
Me.thetextbox.Top = Me.thetextbox.Top _
+ Me.thetextbox.Height - lngHgt
Me.thetextbox.Height = lngHgt

If the text box has a border that won't look right using
this approach, then make the border transparent and use a
rectangle control to display the border.
 
S

Stephen Lebans

There's sample code here showing how to do Center Vertical Alignment.
Just change the calculation to do Bottom alignment:
http://www.lebans.com/verticaljustification.htm
VerticalJustificationA2K.zip is a database containing a function to
allow for vertical centering of the contents of a Label or TextBox
control. Works with both Forms and Reports.

Access 2000 only!

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top