Subject Re: [IBO] tib_grid and function keys
Author stanw1950
Thanks Geoff. I thought there might be an application event that I
could intercept and I'll have to research actions.

--- In IBObjects@y..., Geoff Worboys (TeamIBO) <geoff@t...> wrote:
> > In our bde application we use f2 = edit, f8=insert, enter=post (if
> > 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
> > the grid when the f2 (or any) key is pressed so as not to run the
> > code for the grid? Thanks in advance.
> Hi Stan,
> I am sorry to tell you that we cannot alter IB_Grid key processing
> resolve your problem. The key is being intercepted by the
> 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
> the application message loop and can prevent the message ever
> 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.
> hth
> --
> Geoff Worboys - TeamIBO
> Telesis Computing