Greetings,
I'm sure this can be done, I think the example with the "{Close_On_Leave}" is trying to demonstrate this although I have not gotten all the pieces clear as to how this really works.
In the example below I have the base script, with three fields. The 2nd script is a "modeless" XDialog script. When the user is in Field 2, I want the "modeless" dialog to appear and when they are no longer in Field 2, I want it to close on its own. If the user wishes to close it while they are in Field 2, the Close button should take care of that.
How do I go about doing this?
Base Script
Modeless Script
Regards,
Keith
I'm sure this can be done, I think the example with the "{Close_On_Leave}" is trying to demonstrate this although I have not gotten all the pieces clear as to how this really works.
In the example below I have the base script, with three fields. The 2nd script is a "modeless" XDialog script. When the user is in Field 2, I want the "modeless" dialog to appear and when they are no longer in Field 2, I want it to close on its own. If the user wishes to close it while they are in Field 2, the Close button should take care of that.
How do I go about doing this?
Base Script
Code:
DIM SHARED Fld1 as C DIM SHARED Fld2 as C DIM SHARED Fld3 as C DIM SHARED varC_result as C heading_string = "Call Modeless XDialog while in Field2" footer_string = "Close if not in Field 2" ok_button_label = "&OK" cancel_button_label = "&Cancel" varC_result = ui_dlg_box("XDialog Example",<<%dlg% {region} {text=55,1:heading_string}; {endregion}; {region} Data Field 1:| [.40Fld1]; Data Field 2:| [.40Fld2]; Data Field 3:| [.40Fld3]; {endregion}; {region} {text=55,1:footer_string}; {endregion}; {line=1,0}; {region} <*15=ok_button_label!OK> <15=cancel_button_label!CANCEL> {endregion}; %dlg%)
Code:
DIM StatText as C StatText = "This is the static text to be replaced" ui_modeless_dlg_box("Modeless Dlg",<<%dlg% {region} {Region} ; {Endregion}; {Region} | {text=80,10:StatText}; {Endregion}; {Region} ; {Endregion}; {line=1,0}; <15Close>; {endregion}; %dlg%,<<%code% if a_dlg_button = "Close" then ui_modeless_dlg_close("Modeless Dlg") end if %code%)
Keith
Comment