Page 1 of 1

Colored Progress Bar in PB

Posted: Thu Jun 12, 2003 10:18 pm
by Num3
Pretty Progress .... 8)

Code: Select all

Declare Open_Window_0()

;- Window Constants
;
#Window_0  = 0
#PBM_SETBARCOLOR = $409
#PBM_SETBKCOLOR = $2001
;- Gadget Constants
;
#Gadget_0  = 0


Procedure Open_Window_0()
  If OpenWindow(#Window_0, 251, 249, 300, 100, #PB_Window_SystemMenu  | #PB_Window_SizeGadget  | #PB_Window_TitleBar , "Colored Progress Bar")
    If CreateGadgetList(WindowID())
      ProgressBarGadget(#Gadget_0, 10, 10, 190, 10, 0, 100 ,#PB_ProgressBar_Smooth)       
      PostMessage_(GadgetID(#Gadget_0), #PBM_SETBARCOLOR, 0, RGB(255, 204, 51))
      PostMessage_(GadgetID(#Gadget_0), #PBM_SETBKCOLOR, 0, RGB(51, 102, 153))
      SetGadgetState(#Gadget_0,80)  
      
    EndIf
  EndIf
EndProcedure


open_window_0()
Repeat
  Event  = WaitWindowEvent()
  
  
Until Event  = #PB_EventCloseWindow