Page 1 of 1

ProgressBar in StatusBar

Posted: Thu Jun 03, 2004 3:16 pm
by aXend
Now that ComboBox in ToolBar works (see post earlier) I also would like a ProgressBar in StatusBar. I tested it with SetParent_(), but that doesn't work. Is it possible? And if yes, how?

Posted: Thu Jun 03, 2004 5:52 pm
by Nico

Code: Select all

If OpenWindow(0, 100, 150, 300, 100, #PB_Window_SystemMenu | #PB_Window_SizeGadget, "PureBasic - StatusBar Example")
  
  hstatus= CreateStatusBar(0, WindowID())
  If hstatus
    AddStatusBarField(100)
  EndIf

  If CreateGadgetList(WindowID(0))
  Hprogress=ProgressBarGadget(0, 120, 2,100, 16, 0,100) 

EndIf
  SetParent_(Hprogress,hstatus)
  SetGadgetState   (0,50)

  Repeat
    
  Until WaitWindowEvent() = #PB_EventCloseWindow
EndIf
:)

Posted: Thu Jun 03, 2004 8:26 pm
by aXend
Thanks! I realise now that I made a mistake with the positioning of the ProgressBar. :D