Grids and Comboboxes
Posted: Tue Dec 13, 2011 1:13 pm
I have a screen with a combobox and a grid. It seems like the screen always lands focus on the combobox irrespective of the order in the INPUT statement. I however, need it to default to the grid. Can someone look at the code and make suggestions on what I could try?
Thanks
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,^nosortPLAEX")
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,13,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: INPUT #Cal, FIELDS "4,2,grid 7/28,CNT,SELONE,1001;2,13,9/combo 9,C 9": Cntrow,SelectedComboValue$
00340 if fkey<>93 then
00360 PRINT #Cal, FIELDS "12,16,CL 14": Str$(Curfld) & " " & Str$(CurCol) & " " & Str$(CurRow)
00380 GOTO INP
00400 end if
00420 end