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

  • Thread starter Thread starter Krish
  • Start date Start date
K

Krish

Hi!

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

Krish
 
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.
 
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.
 
Back
Top