(wxPython) icon on panel

J

Jimmy

hi,all!
have you used 'dictionary' of linux, the program that rests on the
panel as an icon, and when you click on the icon, it will display a
window and do something. So i'm wondering how to achieve this. I guess
it's a dialog window, right? but the crucial part is how to minimize
the program to an icon on the panel and make it responsive to the
click event.
thanks in advance!
 
K

kyosohma

hi,all!
have you used 'dictionary' of linux, the program that rests on the
panel as an icon, and when you click on the icon, it will display a
window and do something. So i'm wondering how to achieve this. I guess
it's a dialog window, right? but the crucial part is how to minimize
the program to an icon on the panel and make it responsive to the
click event.
thanks in advance!

I've never used this "dictionary" program you're talking about, but I
think I know what you mean. I would recommend that you download the
wxPython Demo and open the main.py file in the "wxPython2.8 Docs and
Demos\demo" subdirectory. There's a class in there called
"DemoTaskBarIcon" which you can use to figure out how to do the whole
iconizing thing.

As for how to minimize to an icon, this is how I do it:

# bind the frame/app to wx.EVT_ICONIZE
self.Bind(wx.EVT_ICONIZE, self.onMinimize)

# hide the frame
def onMinimize(self, event):
self.frame.Hide()

If you can't get it to work, please ask for help on the wxPython
mailing list: http://www.wxpython.org/maillist.php

They're quite helpful.

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,772
Messages
2,569,593
Members
45,111
Latest member
VetaMcRae
Top