Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid Column Resize
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00026984
Message ID:
00027157
Views:
31
>>>Does anyone know an easy way to dynamically resize a grid column (textbox) based on the size of the source field? (something like AutoSize would be perfect)
>>>
>>I do it by filling an array from AFIELDS which will return the field width in column 3. You can take that and multiply it by some # returned from txtwidth() or fontmetric(6) to determine the width for the column.
>>
>If your clients are only using a few fields, it may be easier just to loop through the columns using len() for each field (times the above-mentioned txtwidth/fontmetric fudge factor, of course).
>
That was my first thought, but I kind of like the afields idea since it'll contain type as well as length (a little more efficient), which I need to set inputmask...I'll try it Monday to see how it works...thanks.
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.
Previous
Reply
Map
View

Click here to load this message in the networking platform