Hi All,
I have a Record_list_box with xdialog. My problem is the List does not refresh/display the lists after I changed a "vLayout" field value.
I have tested the list with "showvar()", It is showed the lists as I designed but not on the xDialog form.
Any idea what is wrong on this [.60,12vSelectRpt^#a_vUnivLists] ?
I have a Record_list_box with xdialog. My problem is the List does not refresh/display the lists after I changed a "vLayout" field value.
I have tested the list with "showvar()", It is showed the lists as I designed but not on the xDialog form.
Code:
dim vLayout as c vLayout = "labels" Sub_get_list(local_variables()) DELETE a_vLayout DIM a_vLayout[3] as c dim temp_list as c temp_list = <<%list% Reports Labels Letters %list% a_vLayout.initialize(temp_list) Print_button_label = "&Print" cancel_button_label = "&Cancel" dim vSelectRpt as c ="" DIM varC_Print as C varC_Print = ui_dlg_box("Select a Print Form",<<%dlg% {region=a} {lf}; {font=tahoma,9} Layout as :| [%v%.37vLayout^=a_vLayout!vLayout_changed]; Select One:; {endregion};;; {region} |{font= tahoma,10}[COLOR="#FF0000"][B][.60,12vSelectRpt^#a_vUnivLists];[/B][/COLOR] {endregion}; {line=1,0};; {region} {justify=Center} <*15=Print_button_label!&Print> <15=cancel_button_label!&CANCEL> {endregion}; %dlg%,<<%code% if a_dlg_button = "vLayout_changed" then 'refresh the list again vLayout = replace_parameters(alltrim(vLayout),local_variables()) [COLOR="#FF0000"] Sub_get_list(local_variables())[/COLOR] 'showvar(vUnivLists,"test") a_dlg_button ="" end if %code%) Function Sub_get_list as v (vars as p) with vars dim vSource as c ="" if vLayout ="reports" then vSource = <<%filenames% cntr_Rpt.set cntrs_sow.set Contracts.dbf %filenames% else 'if vLayout = "labels" vSource = <<%filenames% cntrs_sow.set Contracts.dbf %filenames% end if dim vUnivLists as c ="" if vLayout = "reports" then 'Get just the objects for the specified table/set names vUnivLists = a5enum("Report",alltrim(vSource)) else 'Get just the objects for the specified table/set names vUnivLists = a5enum("label",alltrim(vSource)) end if temp_count = w_count(vUnivLists,crlf()) DELETE a_vUnivLists DIM a_vUnivLists[temp_count] as c a_vUnivLists.initialize(vUnivLists) sort_array("a_vUnivLists") end with end function
Comment