lmgrAddToolBarItems
lmgrAddToolBarItems(t_toolbarName l_menuItems) =>t / nil
Description
Adds menu items with the specified names to the Library Manager toolbar and optionally appends additional items with multiple calls. Item icons can be set using lmgrSetObject.
Arguments
Value Returned
Examples
Adds predefined menu items viewSeparator3 and viewToolbar to toolBar.
; This predefined toggle item, when used in toolbar can only be accessed one way - to hide it.
; It is preceded by a predefined separator to be shown ahead of the toggle.
lmgrAddToolBarItems( "toolBar" '( "viewSeparator3" "viewToolbar" ))
Sets an icon to the button items used in the toolbar.
; Assigning hierarchy check icon to the predefined toggle which resembles
; its standard check box image.
lmgrSetObject( "viewToolbar" '( ("icon" "check-red.png" )))
Complex combination creates a custom separator and simple button.
; Custom items need their callback function to be defined in Virtuoso.
; (warn) as the callback here provides demo feedback as the action.
; Replace "warn" with your callback's name instead.
when( and( lmgrCreateMenuItem( "mySeparator" "separator" nil )
lmgrCreateMenuItem( "myGreenButton" "simple"
'( ( "label" "Green Flag" )
( "icon" "flag-green.png" )
( "callback" ( "warn" )))))
lmgrAddToolBarItems( "toolBar" '( "mySeparator" "myGreenButton" ))
)
; If you decide to exclude a previously added item, it can be removed.
lmgrRemoveToolBarItems( "toolBar" '( "viewToolbar" "viewSeparator3" ))
Displays the toolbar automatically when the Library Manager is launched.
lmgrShowToolBar( "toolBar" t )
Related Topics
Return to top