nfaustin Posted December 23, 2008 Share Posted December 23, 2008 Hi Guys, I just want to ask how to change/update the value of Window's UI Slider control? Here is the screenshot and Window info of it: [font="Palatino Linotype"][size="2"]*** The information contained in this post should be considered and certified WORKS ON MY MACHINE ***[/size][/font][font="Palatino Linotype"][size="2"] [/size][/font] Link to comment Share on other sites More sharing options...
rasim Posted December 23, 2008 Share Posted December 23, 2008 (edited) @nfaustinUse a _GUICtrlSlider_SetPos function.Example:#include <GuiConstantsEx.au3> #include <GuiSlider.au3> $hGUI = GUICreate("Test", 300, 200) $cSlider = GUICtrlCreateSlider(50, 50, 200, 30) GUICtrlSetLimit(-1, 100, 0) $hSlider = GUICtrlGetHandle($cSlider) $cButton_Set = GUICtrlCreateButton("Set", 11, 166, 75, 23) $cButton_Close = GUICtrlCreateButton("Close", 211, 166, 75, 23) GUISetState() While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE, $cButton_Close Exit Case $cButton_Set $iPos = _GUICtrlSlider_GetPos($hSlider) If $iPos < 50 Then _GUICtrlSlider_SetPos($hSlider, 75) Else _GUICtrlSlider_SetPos($hSlider, 25) EndIf EndSwitch WEndoÝ÷ ØZ+ëmxrí®ajwez붢Z+¡Ö«¹nzÊZËrNot tested! Edited December 23, 2008 by rasim Link to comment Share on other sites More sharing options...
nfaustin Posted December 23, 2008 Author Share Posted December 23, 2008 Hi Rasim, Great... Its works... Thanks a lot... [font="Palatino Linotype"][size="2"]*** The information contained in this post should be considered and certified WORKS ON MY MACHINE ***[/size][/font][font="Palatino Linotype"][size="2"] [/size][/font] Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now