Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ReSize Column width also clicks Grid header
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00161670
Message ID:
00161673
Views:
20
Russell,

I just came across this last week. Here's how I solved it:

1. Add a property to your grid class called lJustResized.
2. In the Resize() method of each column put the code THIS.Parent.lJustResized=.T.
3. The click event for each header calls a method I added to the grid called HeaderClick. The first thing HeaderClick does is check the value of lJustResized. If it's .T., the method sets it false and returns with no further action. If it's .F., the method proceeds as normal.

The only problem I've had with this is if the user clicks on the right edge of a header as if to resize the column but never resizes it, the click is still processed. This really isn't too bad, though. It at least keeps the grid from being reordered every time the user resizes a column.

>I am using the click event on a grid column header to index it on its rowsource. However resizing the column also tends to click the grid header and activate the indexing routine.
>How can I stop this?
Previous
Reply
Map
View

Click here to load this message in the networking platform