Reference Guide > W Routines > WoMenuBarSetToggle Procedure
  

WoMenuBarSetToggle Procedure
Sets the status of a menu toggle button.
Usage
WoMenuBarSetToggle, tool_name, pane_index, item_index, value
Input Parameters
tool_name — A string specifying the unique name of the VDA Tool to which the menu bar is attached.
pane_index — An integer or array of integers specifying the index for a specific menu pane in the array of menu panes. The first menu is 1; the second, 2; and so on.
item_index — An integer or array of integers specifying the index of the menu item to change in the specified menu pane. The first item is 1; the second, 2; and so on. This parameter must have the same number of elements as pane_index .
value — An integer or array of integers specifying the status of the toggle. Selected = 1; deselected = 0.
Keywords
Item — A string specifying a menubar item as specified in WoMenuBar.
Discussion
In general, this function sets toggles in VDA Tool and Navigator menus. For example, the Options menu toggles found in VDA Tools and the Configure menu toggles found on the Navigator are set with this routine.
A submenu’s index number is the number following its parent menu index.
Separators are counted as items in the menu, and must be included in the item_index specification.
Example
This code gets the stored status of the Buttonbar, Controls area, and Message area and sets the menu toggles to match.
(From wave/lib/vdatools/wzsurface.pro.)
 
; Set the Options menu toggles.
area_status=[ $ 
TmGetAttribute(tool_name, 'TM', 'BUTTONBAR_STATUS',Default=1), $ 
TmGetAttribute(tool_name, 'TM', 'CONTROLS_STATUS',Default=1), $ 
TmGetAttribute(tool_name, 'TM', 'MESSAGE_STATUS', Default=1) $ 
]
 
WoMenuBarSetToggle, tool_name, [7, 7, 7], [1, 2, 3], area_status
See Also
WoMenuBar

Version 2017.0
Copyright © 2017, Rogue Wave Software, Inc. All Rights Reserved.