UDF > GUI > GuiToolTip >


_GUIToolTip_Deactivate

Désactive un contrôle info-bulle

#include <GuiToolTip.au3>
_GUIToolTip_Deactivate ( $hWnd )

Paramètre

$hWnd Handle du contrôle info-bulle (retourné par _GUIToolTip_Create.)

Valeur de retour

Aucune.

En relation

_GUIToolTip_Activate

Exemple

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

Example()

Func Example()
    Local $hGUI = GUICreate(StringTrimRight(@ScriptName, StringLen(".exe")), 350, 200)

    Local $idToggleTips = GUICtrlCreateButton("Tips: On", 30, 32, 180, 28)
    Local $hToggleTips = GUICtrlGetHandle($idToggleTips)
    ; Crée un contrôle info-bulle en utilisant le style balloon
    Local $hToolTip = _GUIToolTip_Create(0, $TTS_BALLOON)

    ; Ajoute un outil au contrôle info-bulle en utilisant les paramètres par défaut.
    _GUIToolTip_AddTool($hToolTip, 0, "Tooltip for the GUI", $hGUI)
    ; Ajoute un outil au contrôle info-bulle en centrant la pointe sous le bouton au lieu d'au-dessus du pointeur de la souris
    _GUIToolTip_AddTool($hToolTip, 0, "This button toggles the tooltips on and off", $hToggleTips, 0, 0, 0, 0, BitOR($TTF_CENTERTIP, $TTF_SUBCLASS, $TTF_IDISHWND))
    GUISetState(@SW_SHOW)
    
    Local $bActivate = True, $hMsg = GUIGetMsg()

    While $hMsg <> $GUI_EVENT_CLOSE
        If $hMsg = $idToggleTips Then
            $bActivate = Not $bActivate
            If $bActivate Then
                _GUIToolTip_Activate($hToolTip)
                GUICtrlSetData($idToggleTips, 'Tips: On')
            Else
               _GUIToolTip_Deactivate($hToolTip)
                GUICtrlSetData($idToggleTips, 'Tips: Off')
            EndIf
        EndIf
        $hMsg = GUIGetMsg()
    WEnd

    ; Détruit le contrôle info-bulle
    _GUIToolTip_Destroy($hToolTip)
    GUIDelete($hGUI)
EndFunc   ;==>Example