Creates an UpDown control for the GUI.
GUICtrlCreateUpdown ( inputcontrolID [,style] )
Parameters
| inputcontrolID | The controlID of the input control in which the updown control will be created. |
| style | [optional] Defines the style of the control. See GUI Control Styles Appendix. default (-1) : $UDS_ALIGNRIGHT. forced style : $UDS_SETBUDDYINT and $UDS_ALIGNRIGHT if no align defined. |
Return Value
| Success: | Returns the identifier (controlID) of the new control. |
| Failure: | Returns 0. |
Remarks
Related
GUICtrlCreateInput, GUICtrlSetData, GUICtrlSetLimit
Example
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Opt('MustDeclareVars', 1)
Example()
Func Example()
Local $title, $input, $updown, $msg
$title = "My GUI UpDown"
GUICreate($title, -1, -1, -1, -1, $WS_SIZEBOX)
$input = GUICtrlCreateInput("2", 10, 10, 50, 20)
$updown = GUICtrlCreateUpdown($input)
; Attempt to resize input control
GUICtrlSetPos($input, 10, 10, 100, 40)
GUISetState()
; Run the GUI until the dialog is closed
While 1
$msg = GUIGetMsg()
If $msg = $GUI_EVENT_CLOSE Then ExitLoop
WEnd
MsgBox(0, "Updown", GUICtrlRead($input))
EndFunc ;==>Example