Hi All,
I could not get the Return value after selected one from the popup dialog.
Text code file: popupdlg.txt
Does anyone know how to get the return value?
I could not get the Return value after selected one from the popup dialog.
Code:
ui_dlg_box("Popup",<<%dlg% {region} [%P=Sub_ChildPopupDlg()%.40vFileName!vPopup_changed]; {endregion} | {region} <&Files!files>; {endregion}; %dlg%,<<%code% If a_dlg_button ="vPopup_changed" then 'ui_dlg_event("files","file_dblclick",.t.) msgbox("selected","value from child "+vfilename) 'vfilename = Sub_ChildPopupDlg() a_dlg_button ="" else if a_dlg_button = "files" a_dlg_button = "" end if %code%) end Function Sub_ChildPopupDlg as c () '(vars as p ) 'with vars vfileList = <<%str% apples.txt oranges.txt Banana.txt %str% ui_modeless_dlg_box("Files",<<%dlg% {position=dropdown}{nocaption}{close_on_leave} {on_key=enter} [.40,20vSelectfile^#vFileList!file_*] %dlg%,<<%code% if a_dlg_button = "enter" .or. a_dlg_button = "" then '.or. a_dlg_button = "file_*" If a_dlg_button = "file_dblclick" msgbox("selected",vSelectFile) 'return value else If a_dlg_button = "file_change" msgbox("selected",vSelectFile) Sub_ChildPopupDlg = vSelectFile end if Sub_ChildPopupDlg = vSelectFile ui_modeless_dlg_close("Files") a_dlg_button = "" end if if Left(a_dlg_button,5) = "file_" then If a_dlg_button = "file_dblclick" msgbox("selected",vSelectFile) 'return value Sub_ChildPopupDlg = vSelectFile else If a_dlg_button = "file_change" Sub_ChildPopupDlg = vSelectFile msgbox("selected",Sub_ChildPopupDlg) end if ui_modeless_dlg_close("Files") a_dlg_button = "" end if %code%) 'end with end function
Does anyone know how to get the return value?
Comment