StatusBarImage()

Syntax

StatusBarImage(#StatusBar, Field, ImageID [, Appearance])
Description
Sets the specified Field to display an image.

Parameters

#StatusBar The status bar to use.
Field The field index to set the image. The first field index starts from zero.
ImageID The image to set to the specified statusbar field. It can be easily obtained by using ImageID().
Appearance (optional) It can be used to alter the look of the field with the following values:
  #PB_StatusBar_Raised    : raised borders (has no effect on OS X and Windows with theme enabled)
  #PB_StatusBar_BorderLess: without border 
  #PB_StatusBar_Center    : center the icon in the field
  #PB_StatusBar_Right     : align the icon to the right of the field

Return value

None.

Example

  If OpenWindow(0, 0, 0, 340, 50, "StatusBarImage", #PB_Window_SystemMenu | #PB_Window_ScreenCentered | #PB_Window_SizeGadget)
    If CreateStatusBar(0, WindowID(0))
      AddStatusBarField(120)
      AddStatusBarField(170)
    EndIf

    If LoadImage(0, "cube16.ico")     ; change path/filename to your own image (or icon)
      StatusBarImage(0, 0, ImageID(0))
      StatusBarImage(0, 1, ImageID(0), #PB_StatusBar_Right) 
    EndIf  
    
    Repeat
    Until WaitWindowEvent() = #PB_Event_CloseWindow
  EndIf 

Supported OS

All

<- StatusBarID() - StatusBar Index - StatusBarProgress() ->