Hi!
>Can someone explain to me how to add an option or checkbox to a VFP Grid Control! I would like to display a mouse pointer not a | to select the record. Anyway to make only 1 field in the grid the clicked on field instead of the entire record displayed.
>
>I have designed a search form that allows user to enter serach criteria and click a search command buttom. If only 1 record found it goes on to a display form. If more than 1 record found it makes visable a grid to show multiple records to choose from.
>I want the user to be able to point and click on the record he selects and then it would go to the next form.
Why you need checkbox for this? Just define Click event for controls in grid. When that event received, sure record pointer in cursor controlled by grid will stay on the record that appropriate to row selected for click. So you now can run your form for current record...
>If he chooses to exit how do I accept that he pressed the ESC key to make the grid disappear?
Well, this is somewhat tricky for grid. The best way is to use Form's KeyPress event with 'Form.KeyPreview = .T.':
if nKeyCode = 27
if PEMSTATUS(thisform,"MyGrid",5) AND thisform.MyGrid.Visible
thisform.MyGrid.Visible = .F. ...
endif
endif
HTH
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.comICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs
It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.