What I wanted to do was use the progress bar and then hide it and use the field for other info but I've come across an issue.
I can create and use the progress bar as documented in the manual but it does not have a hide command.
To get around this I just sent some text to that field and that worked fine.
The problem comes when you want to create a progress bar again.
It appears that once text has been sent to a status bar field after your first call to the progress bar you can no longer show the progress bar in that field.
I adjusted the demo to show this issue -
Code: Select all
If OpenWindow(0, 0, 0, 340, 50, "StatusBarProgress", #PB_Window_SystemMenu | #PB_Window_ScreenCentered | #PB_Window_SizeGadget)
If CreateStatusBar(0, WindowID(0))
AddStatusBarField(120)
AddStatusBarField(170)
EndIf
StatusBarText(0, 0, "ProgressBar !")
;Put text in the field that will be used for the StatusBarProgress
StatusBarText(0, 1, "AAA")
UpdateWindow_(WindowID(0))
Delay(1500)
;Show the StatusBarProgress
StatusBarProgress(0, 1, 25)
UpdateWindow_(WindowID(0))
Delay(1500)
;Hide the StatusBarProgress using text
StatusBarText(0, 1, "BBB")
UpdateWindow_(WindowID(0))
Delay(1500)
;Show the StatusBarProgress
StatusBarProgress(0, 1, 45)
UpdateWindow_(WindowID(0))
Delay(1500)
;Hide the StatusBarProgress
StatusBarText(0, 1, "CCC")
UpdateWindow_(WindowID(0))
Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf
Is it an issue or am I just being silly?
I'm using PureBasic v4.41 on Windows XP Pro 32 bit.
Thanks.