ToolBarStandardButton()
Syntax
ToolBarStandardButton(#Button, #ButtonIcon [,Mode])Description
Add a standard button to the toolbar being constructed. CreateToolBar() must be called before to use this function. A standard button is an icon which is available directly from the OS.
Parameters
#Button The new toolbar button identifier. #ButtonIcon It can one of the following constants: #PB_ToolBarIcon_New #PB_ToolBarIcon_Open #PB_ToolBarIcon_Save #PB_ToolBarIcon_Print #PB_ToolBarIcon_PrintPreview #PB_ToolBarIcon_Find #PB_ToolBarIcon_Replace #PB_ToolBarIcon_Cut #PB_ToolBarIcon_Copy #PB_ToolBarIcon_Paste #PB_ToolBarIcon_Undo #PB_ToolBarIcon_Redo #PB_ToolBarIcon_Delete #PB_ToolBarIcon_Properties #PB_ToolBarIcon_HelpMode (optional) The mode value can be one of the following constants: #PB_ToolBar_Normal: the button will act as standard button (default) #PB_ToolBar_Toggle: the button will act as toggle buttonGetToolBarButtonState() and SetToolBarButtonState() can be used to retreive or modify a toggle button state.
Return value
None.
Example
If OpenWindow(0, 0, 0, 150, 25, "ToolBar", #PB_Window_SystemMenu | #PB_Window_ScreenCentered) If CreateToolBar(0, WindowID(0)) ToolBarStandardButton(0, #PB_ToolBarIcon_New) ToolBarStandardButton(1, #PB_ToolBarIcon_Open) ToolBarStandardButton(2, #PB_ToolBarIcon_Save) EndIf Repeat Event = WaitWindowEvent() If Event = #PB_Event_Menu Debug "ToolBar ID: "+Str(EventMenu()) EndIf Until Event = #PB_Event_CloseWindow EndIf
See Also
CreateToolBar(), ToolBarImageButton(), ToolBarSeparator()
Supported OS
Windows, Linux