Grids/Combos/CurFld
Posted: Mon Jan 09, 2012 8:25 am
Questions continue..
Can someone explain why in this example, curfld always returns 1, even if the cursor is returned from the comboboxes
Thanks
Can someone explain why in this example, curfld always returns 1, even if the cursor is returned from the comboboxes
Code: Select all
00020 DIM Combovalues$(3)*10
00040 DATA "Value 1","Value 2","Value 3"
00060 READ Mat Combovalues$
00080 DIM Headings$(5), Widths(5), Forms$(5)*25
00100 LET Headings$(1)="Col 1": LET Headings$(2)="Col 2": LET Headings$(3)="Col 3": LET Headings$(4)="Col 4": LET Headings$(5)="Col 5"
00120 MAT Widths=(4)
00140 MAT Forms$=("CC 2,^nosortLAEX")
00160 DATA "1","2","3","4","5","6","7","8","9","10"
00180 READ Mat Gridvalues$
00200 EXECUTE "con gui on"
00220 OPEN #(Cal:=2): "Srow=5,Scol=5,Rows=13,Cols=30,Caption=GRID COMBO,Parent=none,font=calibri:light:small", DISPLAY, OUTIN !
00240 PRINT #Cal: Newpage
00260 PRINT #Cal, FIELDS "2,4,9/combo 9,=,SELECT ": Mat Combovalues$ !:
PRINT #Cal, FIELDS "2,15,9/combo 9,=,SELECT ": Mat Combovalues$
00280 PRINT #Cal, FIELDS "4,2,grid 7/28,headers": (Mat Headings$,Mat Widths,Mat Forms$)
00300 PRINT #Cal, FIELDS "4,2,grid 7/28,=S,500": (Mat Gridvalues$)
00320 INP: RINPUT #Cal, FIELDS "4,2,grid 7/28,CNT,SELONE,1001;2,4,9/combo 9;2,15,9/combo 9": X,Selectedcombovalue$,S$
00340 PRINT #Cal, FIELDS "11,16,CL 14": Str$(Fkey)
00360 PRINT #Cal, FIELDS "12,16,CL 14": Str$(Curfld) & " " & Str$(Curcol) & " " & Str$(Currow)
00390 GOTO INP
00420 END