About Site Map Submit Contact Us Log in | Create an account
Create an account Log In
Average Rating
User Rating:
Visitors Rating:
My rating:

Write review
See full specifications

scripts default iconSYSTRAY - set/get system-tray icons on your computer's desktop (Scripts) Publisher's description

SYSTRAY sets icons in the system-tray of your computer's desktop, if available.

SYSTRAY sets icons in the system-tray of your computer's desktop, if available. SYSTRAY enables setting several sys-tray icon properties and returns the system tray handle(s), if available.

Syntax: handles = systray(varargin);

handles = SYSTRAY retrieves the array of handles for the system-tray icons that were set in Matlab. If no icon is currently displayed in the sys-tray, then the returned array will be empty. If system-tray functionality is unsupported on your platform, then SYSTRAY throws a deliberate error.

handle = SYSTRAY(ICONIMAGE) sets an icon based on the requested icon image and returns its handle. The icon is automatically resized to the sys-tray's default icon size (e.g., 16x16). If ICONIMAGE was already created then it will not be recreated, only its handle will be returned. Note that ICONIMAGE may be an image filename, or any image format accepted by Matlab's im2java function. ICONIMAGE may also be a two-arg pair [X,Map] (indexed image & color map).

handle = SYSTRAY(ICON, param1,value1, param2,value2, ...) sets ICON with initial properties in the familiar format of property name/value pairs. ICON may be either an existing systray icon handle, an array of existing icon handles, or an iconImage as explained above. Property order does not matter and the property names are case-insensitive.

Icon properties can also be read/modified after creation, using get() & set() on the icon handle, or via the dot-notation (hIcon.Tag='iconTag').

The supported properties (gettable and settable) are:

- 'IconImage' - updates the icon image [filename or Matlab image]
- 'ImageAutoSize' - auto-resizes icon to tray size (default='on'/true)
- 'Tooltip' - sets the icon hover tooltip
- 'UIContextMenu' - sets the right-click context-menu (like uicontrols). Provide a uicontextmenu handle or java.awt.PopupMenu object
- 'MarkForDeletion' - set to any value to remove the icon from the systray
- 'Tag' - same as uicontrol
- 'UserData' - same as uicontrol
- 'Message' - text of an informational popup msg next to the icon should be a cell array of {titleText,msgText,severity} where severity = 'none','error','info' or: 'warn' (default: 'info'). Title may be empty, but then no severity icon will show

...and also some gettable-only (i.e., read-only) properties:
- 'Size' - icon size [width,height] - a java.awt.Dimension object
- 'IconWidth' - icon width in [pixels] - numeric value
- 'IconHeight' - icon height in [pixels] - numeric value
- 'Type' - icon type [class name = 'java.awt.TrayIcon']
- 'JavaObject' - reference to the TrayIcon Java object
- 'Class' - class of the Java object

...and also a bunch of callback properties that can be set in any of Matlab's callback formats: 'callback string', @callbackFunc or: {@callbackFunc,params,...}:

- 'MouseClickedCallback' - called when icon is mouse-clicked (pressed & released)
- 'MousePressedCallback' - called when icon is mouse-clicked (before release)
- 'MouseReleasedCallback' - called when icon is mouse-clicked (after release)
- 'MouseEnteredCallback' - called when mouse is moved to within icon bounds
- 'MouseExitedCallback' - called when mouse is moved outside the icon bounds
- 'MouseMovedCallback' - called when mouse is moved over the icon
- 'MouseDraggedCallback' - called when mouse drags the icon
- 'ActionPerformedCallback' - called when icon is double-clicked

hIcons = systray; % returns list of existing icon handles
hIcon = systray('icon.png'); % display a simple icon
hIcon = systray('icon.png','Tooltip','right-click me!','UIContextmenu',cm);
systray(hIcon,'Message',{'title','informational message','warn'});
userdata = get(hIcon,'UserData');
set(hIcon,'userdata',magic(5)); % case insensitive prop names
set(hIcon,'markForDeletion',1); % remove icon from sys tray

This code requires Java 1.6, available since Matlab 7.5. (R2007b). This code also uses some undocumented Matlab features.

Technical details:
The details are explained in http://undocumentedmatlab.com/blog/setting...tem-tray-icons/ and http://undocumentedmatlab.com/blog/setting...popup-messages/

Due to the undocumented nature of some features, I have still not been able to bypass a few limitations in functionality - see the help section for details.

Bugs and suggestions:
Please send to Yair Altman (altmany at gmail dot com)

System Requirements:

MATLAB 7.5 (R2007b)
Program Release Status: New Release
Program Install Support: Install and Uninstall

SYSTRAY - set/get system-tray icons on your computer's desktop (Scripts) Tags:

Click on a tag to find related softwares

Is SYSTRAY - set/get system-tray icons on your computer's desktop (Scripts) your software?

Manage your software

Most Popular

scripts default icon ADP Forum (Scripts) 2.0.3
ADP Forum is a discussion board system that doesn't use any database, but instead stores all the data in... Read more
scripts default icon Soraxdesign PHP Guestbook (Scripts) 3.2.5
The Soraxdesign PHP Guestbook is a simple PHP Guestbook with no MySQL database required, which offers a... Read more
scripts default icon PHPizabi (Scripts) 0.848b-C1
PHPizabi is one of the most powerful social networking platforms on the planet
scripts default icon my little forum 2.0RC1
my little forum is a simple web-forum that supports classical thread view (message tree) as well as... Read more
scripts default icon Tobi's Download Server for Download Managers 0.9
Tobi's Download Server is a PHP/MySQL solution for providing Document and/or Data downloads in a... Read more

Related Category

» Auctions (36)
» Blog (217)
» Books (75)
» Calculators (17)
» Calendars (50)
» Chat Scripts (162)
» Countdowns (1)
» Counters (2)
» Database Tools (1345)
» Date and Time (14)
» Development (1506)
» Documents (3)
» E Commerce (72)
» Education (127)
» Email Systems (202)
» Guestbooks (42)
» Healthcare (2)
» Link Checking (12)
» Link Indexing (46)
» Match Making (7)
» Miscellaneous (201)
» Modules (9734)
» Multimedia (126)
» Networking (113)
» Organizers (4)
» PHP Classes (7)
» Real Estate (1)
» Security (1)
» Top Sites (6)
» Web Fetching (1)
» Web Sites (3)
» Wikis (73)
» XML and PHP (2)