472,783 Members | 956 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,783 software developers and data experts.

pygtk statusicon (tray icon)

does some one know how to use new statusicon included in pygtk since version 2.10.

I cant find any example on the net.
Dec 22 '06 #1
3 9783
6,596 Expert 4TB
Returns : a new gtk.StatusIcon

This constructor is available in PyGTK 2.10 and above.

Creates an empty status icon object.

Expand|Select|Wrap|Line Numbers
  1.     def set_from_pixbuf(pixbuf)
pixbuf : a gtk.gdk.Pixbuf or None

This method is available in PyGTK 2.10 and above.

Makes status_icon display pixbuf. See the gtk.status_icon_new_from_pixbuf() function for details.

Expand|Select|Wrap|Line Numbers
  1.     def set_from_file(filename)
filename : a filename

This method is available in PyGTK 2.10 and above.

Makes status_icon display the file filename. See the gtk.status_icon_new_from_file() function for details.

Expand|Select|Wrap|Line Numbers
  1.     def set_from_stock(stock_id)
stock_id : a stock icon id

This method is available in PyGTK 2.10 and above.

Makes status_icon display the stock icon with the id stock_id. See the gtk.status_icon_new_from_stock() function for details.

Expand|Select|Wrap|Line Numbers
  1.     def set_from_icon_name(icon_name)
icon_name : an icon name

This method is available in PyGTK 2.10 and above.

Makes status_icon display the icon named icon_name from the current icon theme. See the gtk.status_icon_new_from_icon_name() function for details.
So it's
Expand|Select|Wrap|Line Numbers
  1. myStatusIcon = gtk.StatusIcon()
  2. myStatusIcon.set_from_icon_name(icon_name)
or set the icon any of the other ways available.
Dec 22 '06 #2
i found good example. check this link
Jan 2 '07 #3
6,596 Expert 4TB
i found good example. check this link
I will recommend that all GTK users sign up for this list as there are no GTK experts on this forum, yet. A forum makes much more sense than a mial list because you don't get unrelated email in your box, but (for now) this seems like a good solution.
Jan 2 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

by: Zeljko | last post by:
Hi, I have a form with a tray icon. However, when I minimize the form, it stays visible - not in the task bar (I have showintaskbar property set to false), but in a form of a rectangle sitting...
by: Mats-Lennart Hansson | last post by:
Hi, I'm having a hard time getting my service to show a sys tray icon. I've tried to create a separate Windows application where I simply add a notification icon to the form. In the OnStart method...
by: Danielb | last post by:
I want my application to run most of the time as just an notify icon visible in the system tray, with some dialogs windows that open if the user selects an option from the context menu on the tray...
by: quilkin | last post by:
Hi I have an control app which starts up with a small info message then sits down as a tray icon while it does its work. When started manually (e.g.from a shortcut) this always works fine. However...
by: utkarsh | last post by:
Hi, I want to develop a Window Service in C# that should be capable of sisplaying the a icon in the window tray. Based on some logic in service, icon should be changed to some other...
by: Bry | last post by:
Sorry for the repost, but this has been driving me mad for the past few days. There must be a simple solution. There are many other posts about this problem upon an application exit, but my...
by: george d lake | last post by:
Hi, I have an app that runs in the system tray. When I exit the app (from a button on a form) the app ends but the icon stays in the tray. Any ideas? here is the code I use to end the app ...
by: Patrick Dugan | last post by:
I am using VS2005 (vb) and I have a program that starts when Windows boots up. Occasionally the icon that should appear in the system tray does not show up. The program is still running in memory...
by: =?iso-8859-1?B?S2VyZW0gR/xtcvxrY/w=?= | last post by:
Hi, how can i remove/disable the tray icon for the started Express Edition from the system tray. Te icon directs me to the express editons website after clicking on it. I dont want these tray...
by: Rina0 | last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
by: lllomh | last post by:
How does React native implement an English player?
by: Mushico | last post by:
How to calculate date of retirement from date of birth

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.