UDF > GUI > GuiButton >


_GUICtrlButton_SetStyle

Définit le style d'un bouton

#include <GuiButton.au3>
_GUICtrlButton_SetStyle ( $hWnd, $iStyle )

Paramètres

$hWnd ID/handle du contrôle
$iStyle Prend pour valeuur une combinaison des styles de bouton

Valeur de retour

Aucune.

Voir aussi

Consultez BM_SETSTYLE dans la librairie MSDN.

Exemple

#include <GuiButton.au3>
#include <GUIConstantsEx.au3>
#include <MsgBoxConstants.au3>
#include <WindowsConstants.au3>

Example()

Func Example()
    Local $idBtn, $idBtn2

    GUICreate("Buttons", 400, 400)
    GUISetState(@SW_SHOW)

    $idBtn = GUICtrlCreateButton("Button1", 10, 10, 90, 50)

    $idBtn2 = GUICtrlCreateButton("Button2", 10, 70, 90, 50)

    MsgBox($MB_SYSTEMMODAL, "Information", "Setting Button Style")
    _GUICtrlButton_SetStyle($idBtn, $BS_AUTORADIOBUTTON)
    _GUICtrlButton_SetStyle($idBtn2, $BS_AUTOCHECKBOX)

    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE
EndFunc   ;==>Example