Function Reference


_GUICtrlSlider_SetTic

Sets a tick mark in a slider at the specified logical position

#include <GuiSlider.au3>
_GUICtrlSlider_SetTic ( $hWnd, $iPosition )

Parameters

$hWnd Control ID/Handle to the control
$iPosition Position of the tick mark
This parameter can be any of the integer values in the slider's range of minimum to maximum positions

Return Value

Success: True.
Failure: False.

Remarks

A slider creates its own first and last tick marks.
Do not use this message to set the first and last tick marks.

Related

_GUICtrlSlider_ClearTics, _GUICtrlSlider_GetTic

Example

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

Example()

Func Example()
    Local $iTic = Random(0, 100, 1), $idSlider

    ; Create GUI
    GUICreate("Slider Set Tic", 400, 296)
    $idSlider = GUICtrlCreateSlider(2, 2, 396, 20, BitOR($TBS_TOOLTIPS, $TBS_AUTOTICKS, $TBS_ENABLESELRANGE))
    GUISetState(@SW_SHOW)

    ; Set Tic
    _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