CreateStatusBar()

Syntax

Result = CreateStatusBar(#StatusBar, WindowID)
Description
Create and add an empty #StatusBar to the specified WindowID. If #PB_Any is used as '#StatusBar' parameter, the new statusbar number will be returned as 'Result'. If the Result is 0, the StatusBar creation has failed, else it's fine. Once the bar is created, AddStatusBarField() can be used to setup the different parts of the bar.

Example:
  If OpenWindow(0, 0, 0, 440, 50, "StatusBar", #PB_Window_SystemMenu|#PB_Window_ScreenCentered|#PB_Window_SizeGadget)
    If CreateStatusBar(0, WindowID(0))
      AddStatusBarField(90)
      AddStatusBarField(100)
      AddStatusBarField(130)
      AddStatusBarField(100)
    EndIf

    StatusBarText(0, 0, "Area normal")
    StatusBarText(0, 1, "Area borderless", #PB_StatusBar_BorderLess)
    StatusBarText(0, 2, "Area right & raised", #PB_StatusBar_Right | #PB_StatusBar_Raised) 
    StatusBarText(0, 3, "Area centered", #PB_StatusBar_Center)
    
    Repeat
    Until WaitWindowEvent() = #PB_Event_CloseWindow
  EndIf

Supported OS

Windows, Linux, MacOS X

<- AddStatusBarField() - StatusBar Index - FreeStatusBar() ->