Function Reference


_GUICtrlSlider_SetThumbLength

Sets the length of the slider

#include <GuiSlider.au3>
_GUICtrlSlider_SetThumbLength ( $hWnd, $iLength )

Parameters

$hWnd Control ID/Handle to the control
$iLength Length, in pixels, of the slider

Return Value

None.

Remarks

This function is ignored if the trackbar does not have the $TBS_FIXEDLENGTH style.

Related

_GUICtrlSlider_GetThumbLength

Example

#include <GUIConstantsEx.au3>
#include <GuiSlider.au3>
#include <MsgBoxConstants.au3>

Example()

Func Example()
    Local $idSlider

    ; Create GUI
    GUICreate("Slider Set Thumb Length", 400, 296)
    $idSlider = GUICtrlCreateSlider(2, 2, 396, 25, BitOR($TBS_TOOLTIPS, $TBS_AUTOTICKS, $TBS_FIXEDLENGTH))
    GUISetState(@SW_SHOW)

    ; Get Thumb Length
    MsgBox($MB_SYSTEMMODAL, "Information", "Thumb Length: " & _GUICtrlSlider_GetThumbLength($idSlider))

    ; Set Thumb Length
    _GUICtrlSlider_SetThumbLength($idSlider, 10)

    ; Get Thumb Length
    MsgBox($MB_SYSTEMMODAL, "Information", "Thumb Length: " & _GUICtrlSlider_GetThumbLength($idSlider))

    ; Loop until the user exits.
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE
    GUIDelete()
EndFunc   ;==>Example