d0n Posted June 30, 2009 Share Posted June 30, 2009 is it possible to make a slider snap to certain numbers making it impossible to select other numbers? like 5,10,15,20.... so on and you can't pick 6,7,8,14 ? Link to comment Share on other sites More sharing options...
Authenticity Posted June 30, 2009 Share Posted June 30, 2009 (edited) #include <GUIConstantsEx.au3> #include <SliderConstants.au3> Dim $hGUI = GUICreate('Test', 200, 250) Dim $Slider = GUICtrlCreateSlider(25, 20, 150, 35) Dim $Static = GUICtrlCreateLabel('', 25, 60, 100, 23) GUICtrlSetLimit($Slider, 5) GUICtrlSendMsg($Slider, $TBM_SETLINESIZE, 0, 1) GUICtrlSendMsg($Slider, $TBM_SETPAGESIZE, 0, 2) GUICtrlSendMsg($Slider, $TBM_SETTICFREQ, 1, 0) GUICtrlSetData($Static, '0') GUISetState() While 1 Switch GUIGetMsg() Case $Slider GUICtrlSetData($Static, String(GUICtrlRead($Slider)*20)) Case -3 ExitLoop EndSwitch WEnd GUIDelete() Exit Edited June 30, 2009 by Authenticity 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