Jump to content

Recommended Posts

I have several question of the slider usage:

1. Drag the slider, increase the value not by 1 only, say by 10 interval.

2. Change the tick interval to a larger value, 1 is too close for large range.

3. See the code attached. When drag the slider, it will trigger to update the input box. Is it possible to trigger the value update constantly when slidding, not just the slidding has been completed.

$hVideoBR = GUICtrlCreateInput ("", $x+$w, $y+$h, $w1)
GUICtrlSetData(-1, 800)
GuiCtrlCreateLabel("100", $x+10,$y+2*$h,20,20)
$hVBRslider = GUICtrlCreateSlider ($x+30,$y+2*$h,130,20,$TBS_NOTICKS)
GUICtrlSetData(-1, 800)
GuiCtrlCreateLabel("2000", $x+160,$y+2*$h,40,20)

While 1
   $iMsg = GUIGetMsg()
      Case $iMsg = $hVBRslider
         GUICtrlSetData($hVideoBR, GUICtrlRead($hVBRslider))
      Case $iMsg = $hVideoBR
         GUICtrlSetData($hVBRslider, GUICtrlRead($hVideoBR))
      Case $iMsg = $GUI_EVENT_CLOSE
Link to post
Share on other sites

#include <GUIConstants.au3>

GUICreate("slider",220,200, 100,200)
GUISetBkColor (0x00E0FFFF) ; will change background color

$slider1 = GUICtrlCreateSlider (10,10,200,20)
GUICtrlSetLimit(-1,200,0)  ; change min/max value
$button = GUICtrlCreateButton ("Value?",75,70,70,20)
GUICtrlSetData($slider1,45); set cursor
$oldvalue = GUICtrlRead($slider1)
$Status = GUICtrlCreateLabel(guictrlread($slider1),1,180,219,20,BitOR($SS_CENTER,$SS_SUNKEN))

  $n = GUIGetMsg ()
    If $oldvalue <> GUICtrlRead($slider1) Then
        $oldvalue = GUICtrlRead($slider1)
   If $n = $button Then

SciTE for AutoItDirections for Submitting Standard UDFs


Don't argue with an idiot; people watching may not be able to tell the difference.


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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...