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: