Function Reference


_GUICtrlSlider_GetThumbLength

Retrieves the length of the slider

#include <GuiSlider.au3>
_GUICtrlSlider_GetThumbLength ( $hWnd )

Parameters

$hWnd Control ID/Handle to the control

Return Value

Returns the length, in pixels, of the slider.

Related

_GUICtrlSlider_SetThumbLength

Example

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

Example()

Func Example()
        ; Create GUI
        GUICreate("Slider Get/Set Thumb Length (v" & @AutoItVersion & ")", 400, 296)
        Local $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