Home |  Page Index / Recent Changes / Access deniedRecently Commented | Search:
Login:     Password:   

  Bookmarks:   Page Index | Recent Changes | Access deniedRecently Commented | Access deniedUsers | Registration  
Print version :: Microsoft Word ready version

Sw4me: Tktray ...

ўўhttp://tktray.googlecode.com/files/tktray1.2.tar.gz ==Download tktray sourcesЇЇ

tktray(n) 1.1 tktray "tktray"


tktray - System Tray Icon Support for Tk on X11


package require Tcl 8.4
package require tktray ?1.1?

tktray::icon pathName ?options?
pathName configure ?options?
pathName bbox


Tktray is an extension that is able to create system tray icons. It follows http://www.freedesktop.org specifications when looking up the system tray manager. This protocol is supported by modern versions of KDE and Gnome panels, and by some other panel-like application.


tktray::icon pathName ?options?
Create a new icon for the system tray. The application managing the system tray is notified about the new icon. It normally results in the icon being added to the tray. If there is no system tray at the icon creation time, the icon will be invisible. When a new system tray appears, the icon will be added to it.

WM_CLASS attribute for the icon window. Tray manager may use class name to remember icon position or other attributes.

image to show in the system tray. The value must be the name of a photo image. Transparency data of the photo are used to set the window's shape. The icon will be automatically redrawn or resized appropriately on any image modifications.

boolean value indicating whether the icon must be visible. The system tray manager continues to manage the icon whether it is visible or not. Thus when invisible icon becomes visible, its position on the system tray is likely to remain the same.
pathName configure ?options?
Modify icon's options after it was created.

pathName bbox
Get the list of left, top, right and bottom coordinates of the icon relative to the root window of the icon's screen. This command should be used in preference to winfo rootx and winfo rooty to get icon location. No X11 events are delivered to the application when an ancestor window of an icon is resized or moved; thus Tk may have incorrect information about root coordinates of the window.


An icon behaves like a toplevel window with respect to the Tk wm and winfo commands. To get up-to-date information about the icon's screen coordinates, use bbox subcommand rather than winfo rootx and winfo rooty. When -image option is used, the window minimal size and shape are set using the dimensions and transparency information of the photo image. wm minsize command may be used to set the minimal icon size when no image is given. Panel applications obey this setting usually. Like any toplevel window, the icon may contain widgets. It's not recommended to build complex GUIs in the system tray. Also note that the correct handling of the keyboard input is unlikely to be possible.


Anton Kovalenko See http://www.sw4me.com/wiki/Tktray.


icons, system tray, taskbar


Copyright © 2005, Anton Kovalenko

There are no files on this page. [Display files/form]
There is no comment on this page. [Display comments/form]