sidebar.setDrawerVisible
Shows or hides the sidebar drawer.
Syntax
ui.Interface.frontCall("sidebar", "setDrawerVisible",
[visible], [result])
- visible - 1 to show the drawer, 0 to hide it.
- result - The resulting visibility of the drawer: 1 if visible, 0 if hidden.
Usage
The "setDrawerVisible" front call shows or hides the
SideBarDrawer, the panel holding the application list and the start menu, opened by the
App Grid Icon (the "nine-squares" icon) of the SideBarRail.
This call reports the drawer's actual visibility after it runs, rather than nothing. That way, the program can tell when the call refuses a request. The call refuses a request in any of the following cases:
- The drawer is empty.
- The drawer is docked. The call always refuses to hide a docked drawer, and never changes the docking state itself.
- There is no drawer at all, for instance in direct mode, where the host provides its own launcher.
The sidebar.isDrawerVisible
front call retrieves the current visibility, and the sidebar.toggleDrawerVisibility
front call toggles it.
Example
DEFINE ok INTEGER
CALL ui.Interface.frontCall("sidebar", "setDrawerVisible", [1], [ok])
IF ok == 0 THEN
-- request was refused: drawer empty, docked, or unavailable
END IF