# Function Reference

# _GUIToolTip_SetDelayTime

Sets the initial, pop-up, and reshow durations of a ToolTip

#include <GuiToolTip.au3>
_GUIToolTip_SetDelayTime ( $hTool, $iDuration, $iTime )

## Parameters

$hTool | Handle to the ToolTip control (returned by _GUIToolTip_Create.)
$iDuration | Flag that specifies which duration value will be set: $TTDT_AUTOMATIC (0) - Set all three delay times to default proportions. (see remarks) $TTDT_RESHOW (1) - Time it takes for subsequent ToolTip windows to appear as the pointer moves from one tool to another $TTDT_AUTOPOP (2) - Time the ToolTip window remains visible if the pointer is stationary within a tool's bounding rectangle $TTDT_INITIAL (3) - Time the pointer must remain stationary within a tool's bounding rectangle before the window appears
$iTime | Delay time in milliseconds

## Return Value

None.

## Remarks

The default delay times are based on the double-click time. The autopop time will be ten times the initial time and the reshow time will be one fifth the initial time.
For the default double-click time of 500 ms, the initial, autopop, and reshow delay times are 500ms, 5000ms, and 100ms respectively.
If the $iDuration flag is set to $TTDT_AUTOMATIC, use a positive value of $iTime to specify the initial time, in milliseconds. Set $iTime to a negative value to return all three delay times to their default values.

## Related

_GUIToolTip_GetDelayTime

## Example

    #include "Extras\HelpFileInternals.au3"

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

    Example()

    Func Example()
        Local $hGUI = GUICreate("ToolTip Get/Set DelayTime (v" & @AutoItVersion & ")", 450, 300, 100, 100)

        Local $idButton = GUICtrlCreateButton("This is a button", 30, 32, 130, 28)
        Local $hButton = GUICtrlGetHandle($idButton)
        ; Create a tooltip control
        Local $hToolTip = _GUIToolTip_Create(0)

    ;~  $hGUI = 0 ; is OK
        ; Add a tool to the tooltip control
        _GUIToolTip_AddTool($hToolTip, $hGUI, "This is the ToolTip text", $hButton)

        ; set the time for how long the tooltip displays, to 1500 ms ($TTDT_AUTOPOP)
        _GUIToolTip_SetDelayTime($hToolTip, $TTDT_AUTOPOP, 1500)

        GUISetState(@SW_SHOW)

        ; Retrieve and display the time that the tooltip displays
        _MemoMsgBox($MB_SYSTEMMODAL, 'Message', 'Display time : ' & _GUIToolTip_GetDelayTime($hToolTip, $TTDT_AUTOPOP) & ' ms')

        While 1
            If GUIGetMsg() = $GUI_EVENT_CLOSE Then ExitLoop
        WEnd

        _GUIToolTip_Destroy($hToolTip)
        GUIDelete($hGUI)

    EndFunc   ;==>Example