|Subject||Re: [IBO] tib_grid and function keys|
> In our bde application we use f2 = edit, f8=insert, enter=post (ifHi Stan,
> in edit state), escape=cancel (if in edit state) in the screen
> FormKeyDown procedure. After converting to ibobjects, it doesn't
> work quite right when the tib_grid has focus, especially f2.
> Searching the ib_grid.pas file, I see some of these keys are being
> utilized, especially f2. How can I (or can I?) remove the focus from
> the grid when the f2 (or any) key is pressed so as not to run the
> code for the grid? Thanks in advance.
I am sorry to tell you that we cannot alter IB_Grid key processing to
resolve your problem. The key is being intercepted by the CMChildKey
message for the grid, to enable the grid to pickup keystrokes come
through from controls on the grid. To remove this would break the
grids ability to have controls embedded.
However your problem of intercepting keystrokes is most easily and
reliably managed by using Actions (presuming you are using a version
of the VCL with actions defined). These pickup hot keys directly from
the application message loop and can prevent the message ever getting
to the control itself.
If you cannot use actions then move your key intercept code to the
application message loop (Application.OnMessage) and pick out the
required events from there.
Geoff Worboys - TeamIBO