ProgressBarGadget()
Syntax
Result = ProgressBarGadget(#Gadget, x, y, Width, Height, Minimum, Maximum [, Flags])Description
Creates a ProgressBar gadget in the current GadgetList. If #PB_Any is used as '#Gadget' parameter, the new gadget identifier will be returned as 'Result'. The possible values that the progress bar can take are fixed between the Minimum and Maximum one.
'Flags' are are always optional and can be composed of one of the following constants:#PB_ProgressBar_Smooth : The progress bar is smooth instead of using blocks. #PB_ProgressBar_Vertical : The progress bar is in vertical mode.You can add a 'mini help' to this gadget by using GadgetToolTip().
The following commands can be used to act on the list content:
- SetGadgetState(): Change progress bar value.
- GetGadgetState(): Get the current progress bar value.
Example:If OpenWindow(0,0,0,320,160,#PB_Window_SystemMenu|#PB_Window_ScreenCentered,"ProgressBarGadget") And CreateGadgetList(WindowID(0)) TextGadget (3, 10, 10,250, 20, "ProgressBar Standard (50/100)",#PB_Text_Center) ProgressBarGadget(0, 10, 30,250, 30, 0,100) SetGadgetState (0, 50) ; set 1st progressbar (ID = 0) to 50 of 100 TextGadget (4, 10, 70,250, 20, "ProgressBar Smooth (50/200)",#PB_Text_Center) ProgressBarGadget(1, 10, 90,250, 30, 0,200, #PB_ProgressBar_Smooth) SetGadgetState (1, 50) ; set 2nd progressbar (ID = 1) to 50 of 200 TextGadget (5,100,135,200, 20, "ProgressBar Vertical (100/300)",#PB_Text_Right) ProgressBarGadget(2,270, 10, 30,120 ,0,300, #PB_ProgressBar_Vertical) SetGadgetState (2,100) ; set 3rd progressbar (ID = 2) to 100 of 300 Repeat : Until WaitWindowEvent()=#PB_Event_CloseWindow EndIf
Supported OS
All