Numeric Keypad Controls
PP Controls offers a control for entering numeric values with a pop-up keypad. A prefix (i.e. currency symbol) and suffix (i.e. percent sign) can be specified. In addition, the button text of the Delete, clear, cancel and Ok buttons can be specified to allow for language specific definitions. The numeric control only allows numeric values and checks for valid decimal character.
Up-Down - Methods & Properties
NewNumeric
Creates a new Numeric 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 Numeric 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. |
NM1 = PPCtrl.NewUpDown(hwnd, WS_BORDER)
Prefix, Suffix
PPCtrl.Prefix(hWnd) = string
Retrieves/Sets the current prefix/suffix for the numeric 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)
Text
Retrieves/Sets the text of the numeric control specified by hWnd.
DecimalChr
Sets Decimal seperator character for the numeric control specified by hWnd. By default the value from the regional settings is used.
KeypadOk
Sets the text for the OK button on the pop-up keypad for the numeric control specified by hWnd.
KeypadDelete
Sets the text for the Delete button on the pop-up keypad for the numeric control specified by hWnd.
KeypadClear
Sets the text for the Clear button on the pop-up keypad for the numeric control specified by hWnd.
KeypadCancel
Sets the text for the Cancel button on the pop-up keypad for the numeric control specified by hWnd.
Numeric Keypad Styles
ES_LEFT
Left aligns the text of the numeric control
ES_CENTER
Centre aligns the text of the numeric control.
ES_RIGHT
Right aligns the text of the numeric control.
