|Subject||[IBO] Re: IB_Grid, pressing enter at last column|
> OK, TIB_Grid is a TCustomGrid descendant. Its OnKeyPress event is
> too late to pre-empt the inherited behaviour of OnKeyDown, so
> intervene at OnKeyDown instead. Test your conditions and, if the
> dataset is in dssEdit and and grid's (Col = LastTabCol) then pass
> your "safe" key back to the Key var.
> The dataset won't go out of Edit state then, and the Post event
> be called until the grid responds to the VK_UP or VK_DOWN.I forgot that I hooked a tib_keynavigator to my app. This component
handles most of the keyboard events in IBO controls, hence, my
keyboard problems. That said, I remedied the situation by temporarily
disabling tib_keynavigator as follows:
procedure Tfm_jevs.IB_Grid1ColEnter(Sender: TObject);
with tib_grid(sender) do
if col=lastTabCol then
fm_main.IB_KeyNavigator1.GridClasses := ''
fm_main.IB_KeyNavigator1.GridClasses := 'TIB_Grid';
Thank you for your replies. I always am learning new things from you.
(Never thought there was an ib_grid.col and lasttabcol :-) )