PxPlus User Forum

Main Board => Discussions => Nomads => Topic started by: Thomas Bock on July 28, 2022, 03:09:00 AM

Title: cell editing
Post by: Thomas Bock on July 28, 2022, 03:09:00 AM
A customer wants to end cell editing with <ENTER> and move to the next editable cell according to the tabmode.
I tried:
Code: [Select]
preinput [next] $09$ ---> does nothing
preinput [next] -1015 ---> moves to next control
How can I achieve this?
Title: Re: cell editing
Post by: EVa on July 28, 2022, 06:34:15 AM
Is this close enough:

0010 BEGIN ; PRINT 'MODE'($000F$),'CS',
0020 PRINT 'OPTION'("GridMLVersion","0"),
0030 LET G=10; GRID G,@(38,1,40,8)
0040 LET G'COLUMNSWIDE=4,G'ROWSHIGH=5,G'ENTERMODE=2
0050 LET G'COLUMN=0,G'ROW=0,G'COLUMNWIDTH=8,G'CELLTYPE$="Multi_line"
0060 FOR R=1 TO 5; FOR C=1 TO 4; LET G'COLUMN=C,G'ROW=R
0070 LET G'VALUE$="C"+STR(C)+"/R"+STR(R); IF R/C=1 THEN LET G'LOCK=1
0080 NEXT ; NEXT ; LET G'CURRENTCOLUMN=2,G'ROW=1; SET_FOCUS G
0090 WAIT:OBTAIN *; IF CTL=4 THEN STOP
0100 GOTO WAIT

<enter> stops editing the cell, and the next <enter> moves focus to the next cell.
Title: Re: cell editing
Post by: Thomas Bock on July 29, 2022, 04:02:54 AM
I wasn't aware of 'GridMLVersion'.
That comes close, yes. I hope they accept it.
Thank you.