With the code below the drop-down is not initialised to "Production".
Code: Select all
#include "fivewin.ch"
#include "dbcombo.ch"
function main()
local oDlg, oDBC2, oBtn
//local cDept:= "400"
local cDept:= 400
local aItems, aList
define dialog oDlg
aList:= {"Accounting","HR","Marketing","Production","Research","Shipping","Sales"}
//aItems:= {"100","200","400","300","600","500","700"}
aItems:= {100,200,400,300,600,500,700}
@ 30,30 DBCOMBO oDBC2 VAR cDept;
items aItems;
size 100,200 pixel;
list aList;
of oDlg;
update
@ 50, 50 button oBtn prompt "Selected";
of oDlg pixel ;
action msgInfo( "DeptNo: "+hb_valtostr(cDept),"Selected" );
default
activate dialog oDlg center;
return nil
Did you check my last code posted for the XP theme issues with tabs?
Thanks and regards
Alex