Aide:TrayCreateItem.txt

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

Document original V3.3.6.1 :

###Function###
TrayCreateItem

###Description###
Creates a menuitem control for the tray.

###Syntax###
TrayCreateItem ( text [, menuID [, menuentry [, menuradioitem]]] )


###Parameters###
@@ParamTable@@
text
	The text of the control.
menuID
	[optional] Allows you to create a submenu in the referenced menu. If equal -1 it will be added 'behind' the last created item (default setting).
menuentry
	[optional] Allows you to define the entry number to be created. The entries are numbered starting at 0. If equal -1 it will be added 'behind' the last created entry (default setting).
menuradioitem
	[optional] 0 (default) = create a normal menuitem, 1 = create a menuradioitem.
@@End@@


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


###Remarks###
If the 'text' parameter is a blank string ( "" ) then a separator line is created.

By default, normal checked menuitems (not radio menuitems) will be automatically unchecked if you click it!
To turn off this behaviour use the value '2' in <a href="../functions/AutoItSetOption.htm#TrayMenuMode">TrayMenuMode</a>.

Radio menuitems are automatically grouped together and these groups are separated by a separator line or a normal item which is not a radio item.
By default, a clicked radio menuitem will be checked automatically and all other radio items in the same group will be unchecked!
To turn off this behaviour use the value '8' in <a href="../functions/AutoItSetOption.htm#TrayMenuMode">TrayMenuMode</a>.


###Related###
TrayItemSetState, TrayItemSetText, TrayGetMsg, TrayItemDelete, TrayItemSetOnEvent


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


Document traduit V3.3.6.1 :

Texte en Français


Traducteur :

Contributeurs (pour les modifications avant le Wiki) :