Add this code to an existing app, but make sure no forms or other windows in Alpha are open.
Create a new script using the code below.
Run the script.
Click "ControlPanel Hide" from the xdialog
Click "ControlPanel Show" from the xdialog
The CP doesn't show.
Close Alpha and this time first open a form, then repeat the above.
now the CP properly displays.
Can someone verify this behavior and possibly explain it.
Create a new script using the code below.
Run the script.
Click "ControlPanel Hide" from the xdialog
Click "ControlPanel Show" from the xdialog
The CP doesn't show.
Close Alpha and this time first open a form, then repeat the above.
now the CP properly displays.
Can someone verify this behavior and possibly explain it.
Code:
'Date Created: 21-Jan-2014 03:26:47 PM 'Last Updated: 27-Jul-2014 05:00:17 PM 'Created By : pgreulich 'Updated By : pgreulich DIM SHARED xMenu as C dim tb_xMenu_xml as c tb_xMenu_xml = <<%xml% <toolbox animate="false" type="List" theme="NATIVEWINXP" > <category name="Utilities" state="Open" > <item text="ControlPanel Show" icon="$$generic.add.small" data="" onclick="Script:scpCP_Show" /> <item text="ControlPanel Hide" icon="$$generic.remove.small" data="" onclick="ControlPanelHide" /> </category> <category name="Test" state="Closed" > </category> </toolbox> %xml% dim sm as p sm = XMLSchemaManager.get() dim tb_xMenu as p tb_xMenu.xml_def = sm.LoadXML(tb_xMenu_xml) dim xMenu as c xMenu = "" vLeft = 0 vTop = 1 vPos = "{position="+alltrim(str(vLeft))+","+alltrim(str(vTop))+"}" vTitle = "Production Menu" dlg_Menu = <<%dlg% {include=vPos} {position=remember=XD_MenuPos} {region} {font= arial, 10, b } {Toolbox=40,45xMenu^=tb_xMenu};; {endregion}; {line=1,0}; {region} {font= arial, 10, n } <%I=$a5_close;O={I=1} {J+C}Close; %15,1.1Close> {endregion}; %dlg% ''------------------------------- event_Menu = <<%code% If a_dlg_button = "ControlPanelShow" then a_dlg_button = "" ControlPanel.Show() ControlPanel.Activate() end if If a_dlg_button = "ControlPanelHide" then a_dlg_button = "" ControlPanel.Hide() end if IF a_dlg_button = "Close" ui_modeless_dlg_close(vTitle) END IF %code% ''------------------------------- ui_modeless_dlg_box(vTitle,dlg_Menu,event_Menu)
Comment