I have searched and played and can't come up with how to get the checkboxes checked (array variable=.t.) when the xdialog opens. I have a table that holds the stages of a Project with a field for whether the stage is complete or not (third value in the line list). I pull the stages for the Project into a list variable and am trying to populate an xdialog from that list with the checkbox checked if the value is "True". Can someone please steer me in the right direction. Thanks
Code:
dim vL as C vL=<<%l% 100^^Project Initiation^^True 110^^Price Schedule Assignment^^False 115^^Materials - Project Supply Inventory Assessment^^False 120^^Project Costing^^False 130^^Project Quotes^^False 140^^Customer Order^^False 150^^Art - Request Art Assets, Start a Project Folder in Handstand server folder- Art T^^False 155^^Stores - Request Store Inventory from Customer^^False 160^^Art - Acquire Art Assets^^False 170^^Art - Deliver Art Assets to Graphic Team with Vendor Order for Concept Art^^False 175^^Stores - Import Store Inventory and make store lanes^^False 180^^Stores - Attach Project to Selected Stores^^False %l% dim vLshow as C dim vvalue as C dim vfw as C dim a_ps[12] as C for i= 1 to 12 vfw=word(vL,i,crlf()) vLshow=vLshow+alltrim(word(vfw,2,"^^"))+crlf() [COLOR="#FF0000"]'>>> my attempt to get boxed checked based upon the 3rd string value[/COLOR] vvalue=word(vfw,3,"^^") if vvalue="True" eval("a_ps"+i)=".t." else eval("a_ps"+i)=".f." end if next a_ps.initialize(vL) dim a_selected[12] as C ui_dlg_box("Check Box-List Box",<<%dlg% {startup=init}{frame=1,1} {region} [.100,12ps_selected^$$vLshow!select_ps]; {lf}; [.100,12ps_name^#a_selected]; {endregion}; <close> %dlg%,<<%code% if a_dlg_button="init" a_ps1=".t." msgbox(a_ps1) a_dlg_button="" end if if a_dlg_button = "select_ps" then a_dlg_button = "" a_selected.clear() a_selected.initialize(ps_selected) end if %code%)
Comment