Up-Down Controls
PP Controls offers up-down control which are a pair of arrow buttons that the user can click to increment or decrement a value. A minimum and maximum value for the up-down can be specified, and well as decimal or hex format.
Up-Down - Methods & Properties
NewUpDown
Creates a new UpDown Control and returns the handle of the new control.
| hWnd of parent form (or frame) or placeholder (hWnd) | |
| Specifies the style of the window being created. | |
| If the style PC_PLACEHOLDER is specified, then hWnd refers to the control to be used as a as placeholder. The new Up-Down control will be placed on the form at the same location as this control, with the same size and font. The place-holder control is then hidden. Note: If PC_PLACEHOLDER style is not given, then hWnd specifies the parent window for the new control. The new control is positioned according to the current values of PPCtrl.Left, PPCtrl.Top, PPCtrl.Width and PPCtrl.Height. The font of the parent window is used. |
UD1 = PPCtrl.NewUpDown(App.hInstance, Frame1.hWnd, TBS_AUTOTICS,0)
Min, Max
PPCtrl.Max(hWnd) = long
long = PPCtrl.Min(hWnd)
long = PPCtrl.Max(hWnd)
Retrieves/Sets the current minimum and maximum positions for the up-down control specified by hWnd.
Pos
long = PPCtrl.Pos(hWnd)
Retrieves/Sets the currently position of the slider of the up-down control specified by hWnd.
level=PPCtrl.Pos(ud1)
Value
long = PPCtrl.Value(hWnd)
Retrieves/Sets the currently position of the slider of the up-down control specified by hWnd. (Identical in function to pos)
level=PPCtrl.Value(Ud1)
Base
PPCtrl.Base(hWnd) = 16
Sets/Retrieves the current radix base (that is, either base 10 or 16) for the Updown control specified by hWnd.
Up-Down – Styles
UDS_ALIGNLEFT
Positions the up-down control next to the left edge of the buddy window. The buddy window is moved to the right, and its width is decreased to accommodate the width of the up-down control.
UDS_ALIGNRIGHT
Positions the up-down control next to the right edge of the buddy window. The width of the buddy window is decreased to accommodate the width of the up-down control.
UDS_ARROWKEYS
Causes the up-down control to increment and decrement the position when the UP ARROW and DOWN ARROW keys are pressed.
UDS_HORZ
Causes the up-down control's arrows to point left and right instead of up and down.
UDS_NOTHOUSANDS
Does not insert a thousands separator between every three decimal digits.
UDS_WRAP
Causes the position to "wrap" if it is incremented or decremented beyond the ending or beginning of the range.
