Adjust Control Size Automatically

  • Thread starter Thread starter TJ
  • Start date Start date
T

TJ

I have a form containing numerous controls linked to memo
fields in a table. To make the user experience easier I
need to have the form controls automatically adjust in
height based on the amount of data to be displayed
(similar to the Can Grow property on a report). Due to the
number of controls involved I can't just 'draw' larger
controls, and scroll bars are cumbersome. Is there a way
to mimic the Can Grow report property?
 
TJ said:
I have a form containing numerous controls linked to memo
fields in a table. To make the user experience easier I
need to have the form controls automatically adjust in
height based on the amount of data to be displayed
(similar to the Can Grow property on a report). Due to the
number of controls involved I can't just 'draw' larger
controls, and scroll bars are cumbersome. Is there a way
to mimic the Can Grow report property?


There's nothing that will do this automatically for form
controls, but you can use Stephen Lebans' TextHeightWidth
function (www.lebans.com) to calculate how tall a text box
needs to be in order to not need a scroll bar.

Be careful with this kind of user interface though. If the
stuff on a form jumps around too much, users will have a
hard time finding the data they're interested in. A little
can improve your UI, but lot can make make a mess of it.
 
Back
Top