Modifying or removing DIAdem panels and menus requires changing the Desktop file (.DDD). This file stores settings for DIAdem's behaviour, data formats and channel properties. Refer to
Configuring DIAdem for further information.
Follow the instructions below to remove DIAdem menus and panels:
1. Open DIAdem and navigate to the SCRIPT panel.
2. Select
File >> New VBS to create a new script.
3. Underneath the
Option Explicit line, enter the following to declare some array variables:
Dim i, MyPanels, MyMenus
MyPanels = Array("NAV", "VIEW", "ANA", "REP", "SCR")
MyMenus = Array("NAVIGATOR", "VIEW","ANALYSIS", "REPORT", "SCRIPT")4. Call the
Reset method to reset the
BarManager to it's default state by entering
Call BarManager.Reset.
- The BarManager object is used to access panels and bars in DIAdem. Refer to Object: BarManager for more details.
- Note: this step is optional but ensures that the DIAdem environment always starts from it's default saved state.
5. Next, create a
For Loop that iterates through the variable arrays to remove the
File menu item.
- This section utilises the BarManager.Bars.Remove() method to remove a specific menu item. Refer to Method: Remove for Bars for the method definition.
- Copy and paste the lines below to achieve this.
MyPanels = Array("NAV", "VIEW", "ANA", "REP", "SCR")
For i = 0 to 4
Call BarManager.Bars.Remove(MyPanels(i) & "Main")
Call MenuItemDel(MyMenus(i), "1")
Next6. Use the
WndShow() command, as shown, to sequentially show the results of calling
BarManager.Bars.Remove().
Call MsgBoxDisp("Press OK to observe that the File menu has been removed from each Panel.")
WndShow("NAVIGATOR")
Pause(1)
WndShow("VIEW")
Pause(1)
WndShow("ANALYSIS")
Pause(1)
WndShow("REPORT")
Pause(1)
WndShow("SCRIPT")7. To remove the DIAdem panels, leverage the functionality of the
BarManager.Bars.RemoveAll method. The script lines below can be copied.
Call MsgBoxDisp("Press OK to observe that all panels and menus have been removed.")
BarManager.Bars.RemoveAll
WndShow("NAVIGATOR")
Pause(1)
WndShow("SCRIPT")8. Finally, as an optional step, call the
BarManager.Reset method to reset DIAdem back to it's default.
Call msgBoxDisp("DIAdem will now revert to the default UI layout.")
Call BarManager.Reset
- Note: this is a recommended step if the changes made to the .DDD file should not be permanently saved.
- When closing DIAdem, ensure that Exit and Do Not Save is selected from the dialog pop-up to avoid permanent modifications.