In this script, I can limite the values for $x, it can not be <10 or > 60. Its work fine.
The $y, can't be > 60 or < $x, but here is the problem, it can!
Some one can help-me?
Thanks!
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Opt('MustDeclareVars', 1)
Example()
Func Example()
Local $x, $y, $UpDownX, $UpDownY, $msg
GUICreate("My GUI UpDown", -1, -1, -1, -1, $WS_SIZEBOX)
$x = GUICtrlCreateInput(11, 10, 10, 60, 30)
$y = GUICtrlCreateInput(11, 10, 50, 60, 30)
GUICtrlCreateLabel("x",80,10,20,20)
GUICtrlCreateLabel("y",80,50,20,20)
$UpDownX = GUICtrlCreateUpdown($x)
$UpDownY = GUICtrlCreateUpdown($y)
GUISetState()
While 1
If GUICtrlRead($x) < 10 Then GuiCtrlSetData($x,10)
If GUICtrlRead($x) > 60 Then GuiCtrlSetData($x,60)
If GUICtrlRead($y) > 60 Then GuiCtrlSetData($y,60)
If GUICtrlRead($y) < GUICtrlRead($x) Then GuiCtrlSetData($y,GUICtrlRead($x))
$msg = GUIGetMsg()
If $msg = $GUI_EVENT_CLOSE Then ExitLoop
WEnd
EndFunc ;==>Example