Aide:GUICtrlCreateCheckbox.txt

De Wiki AutoIt Français
Aller à : navigation, rechercher

Document original V3.3.6.1 :

###Function###
GUICtrlCreateCheckbox

###Description###
Creates a Checkbox control for the GUI.

###Syntax###
GUICtrlCreateCheckbox ( "text", left, top [, width [, height [, style [, exStyle]]]] )


###Parameters###
@@ParamTable@@
text
	The text of the control checkbox.
left
	The left side of the control. If -1 is used then left will be computed according to <a href="AutoItSetOption.htm#GUICoordMode">GUICoordMode.
top
	The top of the control. If -1 is used then top will be computed according to <a href="AutoItSetOption.htm#GUICoordMode">GUICoordMode.
width
	[optional] The width of the control (default text autofit in width).
height
	[optional] The height of the control (default text autofit in height).
style
	[optional] Defines the style of the control. See <a href="../appendix/GUIStyles.htm#Checkbox">GUI Control Styles Appendix</a>.
	
	default ( -1) : $BS_AUTOCHECKBOX.
	forced styles : $WS_TABSTOP, and $BS_AUTOCHECKBOX if no checkbox style defined.
exStyle
	[optional] Defines the extended style of the control. See <a href="../appendix/GUIStyles.htm#Extended">Extended Style Table</a>.
@@End@@

###ReturnValue###
@@ReturnTable@@
Success:	Returns the identifier (controlID) of the new control.
Failure:	Returns 0.
@@End@@


###Remarks###
To obtain the value of the control see <a href="GUICtrlRead.htm">GUICtrlRead</a>.
To set or change information in the control see <a href="GUICtrlUpdate Management.htm">GUICtrlUpdate...</a>.

A Checkbox control can display an icon or image by using the $BS_ICON or $BS_BITMAP style. Use <a href="GUICtrlSetImage.htm">GUICtrlSetImage</a> to specify the picture to use.

To combine styles with the default style use <b>BitOr</b>($GUI_SS_DEFAULT_CHECKBOX, newstyle,...).

To use the values specified above you must #include <ButtonConstants.au3> in your script.

Default resizing is $GUI_DOCKHEIGHT.


###Related###
GUICoordMode (Option), GUICtrlUpdate..., GUIGetMsg


###Example###
@@IncludeExample@@


Document traduit V3.3.6.1 :

###Function###
GUICtrlCreateCheckbox

###Description###
Crée un contrôle de case à cocher pour l'interface graphique.

###Syntax###
GUICtrlCreateCheckbox ( "text", left, top [, width [, height [, style [, exStyle]]]] )


###Parameters###
@@ParamTable@@
text
	Le texte du contrôle de la case à cocher
left
	Le côté gauche du contrôle. Si vaut -1, alors il sera calculée en fonction de <a href="AutoItSetOption.htm#GUICoordMode">GUICoordMode</a>.
top
	Le sommet du contrôle. Si vaut -1 utilisée, alors il sera calculé en fonction de <a href="AutoItSetOption.htm#GUICoordMode">GUICoordMode</a>.
width
	[optionnel] La largeur de la du contrôle (Ajuste automatiquement le texte par défaut dans la largeur).
height
	[optionnel] La hauteur de la du contrôle (Ajuste automatiquement le texte par défaut dans la largeur).
style
	[optionnel] Définit le style du contrôle. Voir <a href="../appendix/GUIStyles.htm#Checkbox">l'annexe des styles de contrôle de GUI</a>.
	
	par défaut ( -1) : $BS_AUTOCHECKBOX.
	styles forcés : $WS_TABSTOP, et $BS_AUTOCHECKBOX Si aucun style de case à cocher est définie.
exStyle
	[optionnel] Définit le style étendu du contrôle. Voir <a href="../appendix/GUIStyles.htm#Extended">le tableau de style étendu</a>.
@@End@@

###ReturnValue###
@@ReturnTable@@
Succès:	Retourne l'identifiant (ID du contrôle) du nouveau contrôle.
Échec:	Retourne 0.
@@End@@


###Remarks###
Pour obtenir la valeur du contrôle, voir <a href="GUICtrlRead.htm">GUICtrlRead</a>.
Pour définir ou modifier des informations dans le contrôle, voir <a href="GUICtrlUpdate Management.htm">GUICtrlUpdate...</a>.

Un contrôle de case à cocher permet d'afficher une icône ou une image en utilisant le style $BS_ICON ou $BS_BITMAP. Utilisez <a href="GUICtrlSetImage.htm">GUICtrlSetImage</a> pour spécifier l'image à utiliser.

Pour combiner les styles avec l'utilisation de style par défaut <b>BITOR</b>($GUI_SS_DEFAULT_CHECKBOX, newstyle,...).

Pour utiliser les valeurs spécifiées ci-dessus, vous devez inclure <ButtonConstants.au3> dans votre script.

Redimensionnement par défaut est $GUI_DOCKHEIGHT.


###Related###
GUICoordMode (Option), GUICtrlUpdate..., GUIGetMsg


###Example###
@@IncludeExample@@


Traducteur :TT22

Contributeurs (pour les modifications avant le Wiki) :