Function Reference


_GUICtrlSlider_GetTic

Retrieves the logical position of a tick mark

#include <GuiSlider.au3>
_GUICtrlSlider_GetTic ( $hWnd, $iTic )

Parameters

$hWnd Control ID/Handle to the control
$iTic 0-based index identifying a tick mark. Valid indexes are in the range from zero to two less than the tick count returned by the _GUICtrlSlider_GetNumTics() depends on the _GUICtrlSlider_SetTicFreq().

Return Value

Success: the logical position of the specified tick mark.
Failure: -1.

Related

_GUICtrlSlider_SetTic

Example

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

Example()

Func Example()
        ; Create GUI
        GUICreate("Slider Get/Set Tic (v" & @AutoItVersion & ")", 400, 296)
        Local $idSlider = GUICtrlCreateSlider(2, 2, 396, 20, BitOR($TBS_TOOLTIPS, $TBS_AUTOTICKS, $TBS_ENABLESELRANGE))
        GUISetState(@SW_SHOW)

        ; Set Tic
        Local $iTic = Random(0, 100, 1)
        _GUICtrlSlider_SetTic($idSlider, $iTic)

        ; Get Tic
        MsgBox($MB_SYSTEMMODAL, "Information", "Tic: " & _GUICtrlSlider_GetTic($idSlider, $iTic))

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