Hi,
I have a rve with a document where most of it is readonly. I have some fields wich is editable, how do I tab between the editable fields.
They all have the same style.
One problem is that the caret can be between two editable fields.
Best regards
Ove Halseth
TAB to the next editable cell
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Use OnKeyPress event.
There is a limitation, if the key is pressed when the caret is inside the table cell - you cannot move the caret out of this cell in this event (this will destroy the cell inplace editor, but it's not allowed in this event).
Use PostMessage to avoid this problem.
(examples of using PostMessage:
http://www.trichview.com/support/trichv ... tion_4.htm
http://www.trichview.com/support/trichv ... ream_4.htm
http://www.trichview.com/support/trichv ... brve_6.htm
Demos\Delphi\Assorted\Graphics\DragImg\
There is a limitation, if the key is pressed when the caret is inside the table cell - you cannot move the caret out of this cell in this event (this will destroy the cell inplace editor, but it's not allowed in this event).
Use PostMessage to avoid this problem.
(examples of using PostMessage:
http://www.trichview.com/support/trichv ... tion_4.htm
http://www.trichview.com/support/trichv ... ream_4.htm
http://www.trichview.com/support/trichv ... brve_6.htm
Demos\Delphi\Assorted\Graphics\DragImg\
-
- Posts: 9
- Joined: Wed Sep 21, 2005 12:17 pm
Tanks a lot for your answers.
I found the OnKeyPress working(thought that KeyPress was for characters only and that it would not trigger on tab, enter ...)
But my problem is that the editfields is a cell, and to make it a bit more complicated it is often a table consisting of a single cell within another table. (Have posted an exaple rve doc to your mail-adr.)
Apart from using PostMessage, how do we locate the cell wich has focus?
Best regards
Ove Halseth
I found the OnKeyPress working(thought that KeyPress was for characters only and that it would not trigger on tab, enter ...)
But my problem is that the editfields is a cell, and to make it a bit more complicated it is often a table consisting of a single cell within another table. (Have posted an exaple rve doc to your mail-adr.)
Apart from using PostMessage, how do we locate the cell wich has focus?
Best regards
Ove Halseth
-
- Posts: 9
- Joined: Wed Sep 21, 2005 12:17 pm
-
- Posts: 9
- Joined: Wed Sep 21, 2005 12:17 pm
Hi
I'm stuck here:-(
I can't find where to put the PostMessage.
- In rve's OnKeyPress=> It's not triggered when focus is inside a table
- I found this: http://www.trichview.com/support/files/ ... ncells.zip
but with OnCellEditing you can't tell if user used tab to move around or used mouse.
So now I'm looking for a way to set the inplace editor OnKeyPress event.
Do you have any examples/hints?
Best regards
Ove Halseth
I'm stuck here:-(
I can't find where to put the PostMessage.
- In rve's OnKeyPress=> It's not triggered when focus is inside a table
- I found this: http://www.trichview.com/support/files/ ... ncells.zip
but with OnCellEditing you can't tell if user used tab to move around or used mouse.
So now I'm looking for a way to set the inplace editor OnKeyPress event.
Do you have any examples/hints?
Best regards
Ove Halseth