A comboclass which uses multidimensional array’s or ADO tables as data source.
We have also to tell the program which column (number or name) must update the get (from te combox)
A little example (Array from code) , leaving only what is relevant
Using a ADO Table :
ADDITINAL possibilty's :
1) The combox array can be built from DBF
2) We can link a Comboget to other control's as :
The osay will be updated from the oget with column city
3) Using Filters
Each txcombox can have a filter like :
4) Also available in xbrowse , example :
Code and demo's are available
You can try as link : https://www.mediafire.com/?7cx5ppjklv3hxrq
Frank Demont
We have also to tell the program which column (number or name) must update the get (from te combox)
A little example (Array from code) , leaving only what is relevant
Arr := {{" ","Empty"},{"M", "Monday"}, {"T", "Tuesday"},{"W","Wednesday"}}
TXCOMBOX oCombox ;
ARRAY Arr;
HEADERS "Day" ; // Second column receive default !
SIZES 35 // Second column receive default !
WITH OBJECT oCombox
REDEFINE GET oGet VAR inp ID 180 OF oDlg PICTURE "!"//UPDATE
:MakeGetBox(oGet,"Day")
ENDUsing a ADO Table :
oRs := AdoUse(g:Con,"Gemeente") // Fields gemeente , postnr , alfabetic
TXCOMBOX ComboAdo RECSET oRs;
FIELDS "Postnr","Gemeente","Alfabetic";
HEADER "Postcode","City";
COLSIZES 50,150
REDEFINE GET oGet VAR Postcode....
ComboAdo:MakeGetBox(oGet,"PostCode")ADDITINAL possibilty's :
1) The combox array can be built from DBF
TXCOMBOX ComboArr ; // All the fields from the dbf are included gemeente , postnr
// FIELDS Gemeente , postnr is als possible
HEADERS "City" , "Postcode" ;
ALIAS GEMEENTE;
COLSIZES 150 , 40
COmboArr:BuildArr()
REDEFINE GET oGet VAR Postcode....
ComboArr:MakeGetBox(oGet,"PostCode")2) We can link a Comboget to other control's as :
REDEFINE oSay .....
oGet TXLINK TO oSay COL "City" , ....
TxMakelink(oGet)The osay will be updated from the oget with column city
3) Using Filters
Each txcombox can have a filter like :
Combo:bFilter := {||c := "1*","Postnr LIKE " + c}}
// c can also be a value from another get
// a get can determine the combo arrays or ors from the other get's4) Also available in xbrowse , example :
WITH OBJECT oBrw:oCol("CLient")
:nEditType := EDIT_GET_BUTTON
ComboCl:MakeGetBox(oBrw:oCol("CLIENT"))
END
TXLINK oBrw:oCol("Client") TO oBrw:oCol("Country") COL "Country"Code and demo's are available
You can try as link : https://www.mediafire.com/?7cx5ppjklv3hxrq
Frank Demont
test