ProgressBar in StatusBar

Just starting out? Need help? Post your questions and find answers here.
aXend
Enthusiast
Enthusiast
Posts: 103
Joined: Tue Oct 07, 2003 1:21 pm
Location: Netherlands

ProgressBar in StatusBar

Post 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?
Nico
Enthusiast
Enthusiast
Posts: 274
Joined: Sun Jan 11, 2004 11:34 am
Location: France

Post 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
:)
aXend
Enthusiast
Enthusiast
Posts: 103
Joined: Tue Oct 07, 2003 1:21 pm
Location: Netherlands

Post by aXend »

Thanks! I realise now that I made a mistake with the positioning of the ProgressBar. :D
Post Reply