*mycombo.init && All props left at their default >With this > .Rowsourcetype = 1 > .Rowsource = ; > 'Description 1,pk123,Col31,'+; > 'Description 2,pk138,Col32,'+; > 'Description 3,pk178,Col33,'+; > 'Description 4,pk198,Col34' && 3 per row > .Columncount = 3 > .Boundcolumn = 2 > .Columnwidths = '100,50,50' >Endwith > >* A commandbutton click to check selected >With thisform.myCombo > Messagebox( ; > 'Value : '+ .Value + chr(13)+; > 'Col1 : '+.List(.ListIndex,1)+chr(13)+; > 'Col2 : '+.List(.ListIndex,2)+chr(13)+; > 'Col3 : '+.List(.ListIndex,3) ) >EndwithValue returns column 2 (Boundcolumn) content but you can access any column value using List(ListIndex,ColNum) - (honestly I prefer List(Listindex,Col) approach vs value).
* Setup of the cursor for listbox CREATE CURSOR TmpListbox (TypeRes C(11),TypeValue C(3)) INSERT INTO TmpListbox (TypeRes,TypeValue) VALUES ('Description1','ShortDescription1') INSERT INTO TmpListbox (TypeRes,TypeValue) VALUES ('Description2','ShortDescription2')So, I could use the same approach as if it would come from a table in the listbox definition. Thus, all the code I need is just to put it in the Init() of the form.