; #FUNCTION# ==================================================================================================================== ; Name...........: TrayCreateItem ; Description ...: Creates a menuitem control for the tray ; Syntax.........:TrayCreateItem ( text [,parentID [, ixEntry [, fRadioItem]]] ) ; Parameters ....: text - The text of the control ; $parentID - [optional] Control ID of parent menu (-1 if at first level). Default: -1 ; $ixEntry - [optional] Index of insertion position ; |Default: -1 (new item is below previous item) ; fRadioItem - [optional] 0 for checkbox, 1 for radio (black circle) Default: 0 (like checkbox) ; Return values .: Success - Identifier (controlID) of the new tray menu item ; -Failure - 0 ; Author ........: ; Modified.......: ; Remarks .......: If the text parameter is a blank string ( "" ) then a separator line is created ; + ; Behaviour of fRadioItem depends on value of Opt("TrayMenuModemode": ; + ; TrayMenuMode = 0, 1, or 5: item acts like checkbox or auto-radio ; + ; TrayMenuMode = 9 or 13: item acts like checkbox or manual radio ; + ; TrayMenuMode = 3 or 9: Set/clear checkbox/radio states by calling TrayItemSetState with ; $TRAY_CHECKED/$TRAY_UNCHECKED parameters ; + ; For modes 0, 1, 5: ; + ; - radio groups are delimited by separators and checkbox items ; + ; - clicking on one radio item checks it and unchecks others in the group ; + ; For modes 0, 1, 5, 9 and 13: clicking on a checked checkbox item unchecks it; clicking on an unchexked one unchecks it ; + ; Place the #NoTrayIcon directive at the top of your script to leave icon display to TraySetState. ; Related .......: TrayMenuMode, TrayItemSetState, TrayItemSetText, TrayGetMsg, TrayItemDelete, TrayItemSetOnEvent ; Link ..........: ; Example .......: Yes ; ===============================================================================================================================