Sets the length of the slider
#include <GuiSlider.au3>
_GUICtrlSlider_SetThumbLength ( $hWnd, $iLength )
$hWnd | Control ID/Handle to the control |
$iLength | Length, in pixels, of the slider |
This function is ignored if the trackbar does not have the $TBS_FIXEDLENGTH style.
#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