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

Need the height of a text box to adjust automatically?

Status
Not open for further replies.

alex35

Technical User
Oct 15, 2001
15
US
My reports contains a text box with names in it. I would like the height of the text box (entire row actually) to grow or shrink horizontally as preferred to vertically which is what the Can Shrink? and the Can Grow? options in the Property table of the text box offers.

thanks in advance,
William
 
William:

Why not just set the width to the report width and not worry about adjusting? If you have other controls to the right of this control won't they end up behind this control as it expands?

If you really need to adjust the width, you would need to capture the length of the string with the Len function and then set the control's width to that number times some determined value (based on the font/size) for each character.

The problem you may run into is determing that value if you are using a proportional font as opposed to a fixed width (such as Courier) font. Larry De Laruelle
ldelaruelle@familychildrenscenter.org

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top