Subject | Navigation and Post on a TIB_Grid with RETURN key |
---|---|
Author | Hug |
Post date | 2000-12-22T09:35:04Z |
IB 6, IBO 3.6 and C++B 5
I have an updatable, insertable TIB_Grid with
NavigateOptions->gnBrowseAlwaysNavigate=true
TabMovesOut=false
and I try to "substitute" TAB key behavior with the RETURN key.
At the moment, when the user press RETURN, on TIB_GridKeyPress I make:
if(IB_Grid->Col >= IB_Grid->FirstTabCol && IB_Grid->Col < IB_Grid->LastTabCol)
IB_Grid->Col++;
and then, next control on grid get focus correctly.
But, at LastTabCol, I can't make IB_Grid->Row++ because new row not exists yet (and I get "Grid index out of range" error).
I tryed IB_Grid->KeyDown() but, of course, this method is not accessible.
All I need is, at last column, simulating the DOWN key or the TAB key behavior, that is to say, Post current record, put state on Insert for a new record and locate focus on first column next row.
How this can be solved?
I hope to be understood. I promise to improve my english for the new year.
By now, merry christmas everybody and happy holidays (Bon Nadal, as it's said on my country)
Hugo.
[Non-text portions of this message have been removed]
I have an updatable, insertable TIB_Grid with
NavigateOptions->gnBrowseAlwaysNavigate=true
TabMovesOut=false
and I try to "substitute" TAB key behavior with the RETURN key.
At the moment, when the user press RETURN, on TIB_GridKeyPress I make:
if(IB_Grid->Col >= IB_Grid->FirstTabCol && IB_Grid->Col < IB_Grid->LastTabCol)
IB_Grid->Col++;
and then, next control on grid get focus correctly.
But, at LastTabCol, I can't make IB_Grid->Row++ because new row not exists yet (and I get "Grid index out of range" error).
I tryed IB_Grid->KeyDown() but, of course, this method is not accessible.
All I need is, at last column, simulating the DOWN key or the TAB key behavior, that is to say, Post current record, put state on Insert for a new record and locate focus on first column next row.
How this can be solved?
I hope to be understood. I promise to improve my english for the new year.
By now, merry christmas everybody and happy holidays (Bon Nadal, as it's said on my country)
Hugo.
[Non-text portions of this message have been removed]