ToolBarSeparator()

Syntax

ToolBarSeparator()
Description
Add a vertical separator to toolbar being constructed. CreateToolBar() must be called before to use this function.

Parameters

None.

Return value

None.

Example

  If OpenWindow(0, 0, 0, 150, 25, "ToolBar", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
    If CreateToolBar(0, WindowID(0))
      UsePNGImageDecoder()
      Path$ = #PB_Compiler_Home  + "Examples" + #PS$ + "Sources" + #PS$ + "Data" + #PS$ + "ToolBar" + #PS$ + ""
      ToolBarImageButton(0, LoadImage(0, Path$ + "New.png"))
      ToolBarSeparator()
      ToolBarImageButton(1, LoadImage(1, Path$ + "Open.png"))
      ToolBarSeparator()
      ToolBarImageButton(2, LoadImage(2, Path$ + "Save.png"))
      ToolBarSeparator()
      ToolBarSeparator()
    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()

Supported OS

All

<- ToolBarImageButton() - ToolBar Index - ToolBarToolTip() ->