Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Guide to Clip-4-Win version 3.0 - Norton Guide http://www.X-Hacker.org [^^Up^^] [Menu] [About The Guide]
 WProgressBar           Progress bar control class
 ----------------------------------------------------------------------------
 WProgressBar
 Progress bar control class
 ----------------------------------------------------------------------------
 
 Properties
 Current        The value of the counter
 DoneColor      The RGB() value for the "done" part
 Max            The maximum value of the counter
 Min            The minimum value of the counter
 TextDoneColor  The RGB() value for the "done" part of the percentage
 TextToDoColor  The RGB() value for the uncompleted part of the percentage
 ToDoColor      The RGB() value for the uncompleted part
 WndClass       The name of the control's window class ("button")
 WndStyle       The control's usual style (a combination of WS_* values)
 
 Methods
 WProgressBar:Init()        Construct a progress bar control object
 WProgressBar:ReDo()        For internal use
 
 Inherits From
 WControlWindow
 
 Inherited By
 Nothing.
 
 Description
 This is the class for a progress bar (meter) control (a two-
 coloured rectangle whose "done" area corresponds to the value
 of a counter, optionally displaying a string or a percentage).
 
 As this is implemented using an owner-drawn button, to put
 this control in a dialog you should use a button with the
 BS_OWNERDRAW style.
 
 Because Clip-4-Win uses "smart dialogs with dumb controls",
 few properties and few methods are required in this class or
 most sub-classes.  (The WDialog class provides the logic,
 rather than spreading it across the controls.)
 
 Example
 // From SOURCE\OO\CLASSES\PROGBAR.PRG:
 INIT DIALOG self                                  ;
      Title ""  Style ::WndStyle  At 20,20  Size 120,55
 
 /*
  *  Id -1 is often used when you don't care what the Id is
  *  (typically for static text).
  */
 @ Id -1  Blackframe  At 8,8  Size 104,19
 
 // The "long" way...
 //@ Id IDD_BAR  Obj ::oPBar  Control WProgressBar  WClass "Button" ;
 //   Style BS_OWNERDRAW + CTL_DEFSTYLE  At 10,10  Size 100,15
 
 // ...and the short:
 @ Id IDD_BAR  Obj ::oPBar  ProgressBar  At 10,10  Size 100,15
 
 if ::lBtn
      @ Id IDCANCEL  Button Cancel  Title ::cBtn  At 40,35 Size 40,12
 endif
 
 See Also  (press Enter)

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson