Jump to content
Sign in to follow this  

[SOLVED] Slider + Input to work in conjunction

Recommended Posts


I'm trying to create a slider/editbox combo, but I'm running into issues...

Moving the slider should change the value in the editbox (I managed to do this easily) but typing numbers into the editbox should adjust the slider position on the fly.

It'd be even better if numbers outside the range of the slider did nothing and made the error beep.

My current code is:

#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <SliderConstants.au3>
#include <WindowsConstants.au3>

Opt("GUIOnEventMode", 1)
#Region ### START Koda GUI section ### Form=
Global $Form1 = GUICreate("Form1", 633, 447, 192, 124)
Global $Slider1 = GUICtrlCreateSlider(210, 88, 150, 45)
Global $Input1 = GUICtrlCreateInput("0", 385, 96, 121, 21, BitOR($ES_AUTOHSCROLL,$ES_NUMBER))
#EndRegion ### END Koda GUI section ###

While 1

Thanks in advance, I'm sure there's something simple I'm missing...

Edited by montymintypie

Share this post

Link to post
Share on other sites

Yes, it was simple... A better use of the search function....


Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this