Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Resizing Grid.Width
Message
From
22/12/2002 13:12:56
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Title:
Resizing Grid.Width
Miscellaneous
Thread ID:
00735271
Message ID:
00735271
Views:
42
I'm using VFP 7.0

When I resize my Grid, the Grid.Width doesn't resize properly.

My grid base class sets the Grid.Width programically by adding all the Column.Widths plus extra for the scroll bars, delete mark, column lines, etc.
But when it resizes larger, the Grid.Width is ALWAYS too wide and leaves extra space on the right of the last column.
And when it resizes smaller, the Grid.Width is ALWAYS too narrow trigger a scroll bar along the bottom.

How can I calculate the correct width for a grid (just wide enough to avoid a scroll bar at the bottom) so that it appears the same when it resizes?

As I was writing this, it just occured to me that the static components of a grid (scrollbar, deletemark, columnlines, etc) probably don't resize. So maybe I have to subtract the static widths before calculating the resize amount and then add them back in after the calculation?

Hos do I determine the width of all the static grid components?

TIA
Bill Morris
Next
Reply
Map
View

Click here to load this message in the networking platform