Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid w/AllowCellSelection = F still allows cell selectio
Message
 
To
18/05/2005 10:45:04
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
01015371
Message ID:
01015402
Views:
29
This message has been marked as the solution to the initial question of the thread.
Malcolm,

You can try to disable all the columns. I have some grids that I run with some of the columns disabled and some enabled in order to make the grid appear like AllowCellSelection is false for the non-editable columns, but true for the editable columns. There is one case where focus can get into a column and that is when a header is clicked and a resort is performed. I believe the framework is explicitly calling a SetFocus(). To overcome this, I simply kludge a
KEYBOARD '{LEFTARROW}{RIGHTARROW}' PLAIN CLEAR
in the AfterResort() method and the disabled columns won't receive focus.

HTH,
Chad

>VFP 8 and VFP 9: I have several grids being used as listboxes and thus have these grid's .AllowCellSelection = .F.
>
>When my form is first displayed, sometimes the first mouse click in one of these grids results in the selected cell gaining focus. If I click to another record, then return to the first record everything is fine. This doesn't happen frequently, but often enough to get complaints from my users who are naturally confused by this behavior. Note that this behavior is not limited to the first click in the grid - sometimes it occurs later but this is more rare.
>
>My "Plan B" is to place a transparent shape over these grids and attempt to manage mouse clicks myself. I'm hoping there may be a simpler solution.
>
>Anyone else seeing what I'm seeing?
>
>Any ideas on a simple solution?
>
>Thank you,
>Malcolm
_________________________________
There are 2 types of people in the world:
    Those who need closure
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform