Edit Mode in table cell (OpenInsight 16-Bit Specific)
At 04 FEB 2003 03:35:55AM Colin Rule wrote:
Pressing F2 goes into edit mode within a cell.
By default this highlights the entire cell contents.
Is there any simple method of setting this so it automatically places the cursor at the end of the text, so you can type more stuff in.
This is the way Excel works, and I would like to have our application work in the same manner.
Thanks
Colin
At 04 FEB 2003 04:14AM Richard Hunt wrote:
Colin,
Set up a "hidden" menu item with an "accelerator" of "F2". Add a script to this menu item as follows…
FOCUS=@WINDOW:'.TABLE_1'
POS=GET_PROPERTY(FOCUS,'SELPOS')
RESULT=SET_PROPERTY(FOCUS,'SELECTION',-1)
RETURN 1
You might want to also enable this accelerator when your edit table has focus (gotfocus) and disable this accelerator when your edit table loses focus (lostfocus).
At 04 FEB 2003 06:38AM Colin Rule wrote:
Good idea, what a clever chap you are.
I will try this.
At 04 FEB 2003 07:32AM Colin Rule wrote:
YES, it worked, thanks:
One line of code too.
.TABLE-]SELECTION=-1:@FM:-1