StatusBarImage()

语法

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

参数

#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)
  #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

返回值

无.

示例

  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 | #PB_StatusBar_Raised) 
    EndIf  
    
    Repeat
    Until WaitWindowEvent() = #PB_Event_CloseWindow
  EndIf 

已支持操作系统

所有

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