Function Reference

_GUICtrlSliderSetLineSize

Sets the number of logical positions the slider moves.

#Include <GuiSlider.au3>
_GUICtrlSliderSetLineSize($h_slider, $i_linesize)

 

Parameters

$h_slider handle of the control
$i_linesize New line size

 

Return Value

Returns a value that specifies the previous line size.

 

Remarks

Sets the number of logical positions the slider moves in response to keyboard input from the arrow keys.
The logical positions are the integer increments in the slider's range of minimum to maximum slider positions.

 

Related

_GUICtrlSliderGetLineSize

 

Example


#include <GUIConstants.au3>
#include <GuiSlider.au3>

opt('MustDeclareVars', 1)

Dim $Gui_Slider, $slider1, $button, $msg, $h_slider, $Status

$Gui_Slider = GUICreate("Slider Set Line Size", 220, 100, 100, 200)
GUISetBkColor(0x00E0FFFF)  ; will change background color

$slider1 = GUICtrlCreateSlider(10, 10, 200, 20)
GUICtrlSetLimit(-1, 200, 0) ; change min/max value
$button = GUICtrlCreateButton("Set Line Size", 75, 55, 70, 20)
GUISetState()
GUICtrlSetData($slider1, 45) ; set cursor
$h_slider = ControlGetHandle($Gui_Slider, "", "msctls_trackbar321")
$Status = GUICtrlCreateLabel("Line Size: " & _GUICtrlSliderGetLineSize ($h_slider), 0, 80, 220, 20, BitOR($SS_SUNKEN, $SS_CENTER))
While 1
   $msg = GUIGetMsg()
   Select
      Case $msg = $GUI_EVENT_CLOSE
         ExitLoop
      Case $msg = $button
         _GUICtrlSliderSetLineSize ($h_slider, 10)
         GUICtrlSetData($Status, "Line Size: " & _GUICtrlSliderGetLineSize ($h_slider))
   EndSelect
WEnd