How do I find out where an icon was clicked (relative to itself) using python?
Essentially, what I want to do is have an icon that has different symbols for various programs at the bottom of it (for example, a python file might have a symbol for command prompt, a text editor, and a debugger, all little squares at the bottom of the开发者_开发技巧 icon), and when the user double clicks on one of these, that program is used to open it up.
How can I put these symbols there (do I have to make a special icon, or is there an easier way to do it) and how can I see if they double click on these? Also, how can I stop the normal program from running when they double click, so only the program I want will work?
Some background: I'm using Python 2.5 and I'm on a Windows Vista, but if possible I'd like for this to be able to run on XP or 7 as well.
You use some GUI system, like GTK+ or wxPython or something.
Sounds like you want to write an extension to windows explorer. This would be a significant project and I'm not sure Python would be the best language (you'd be accessing the win32 api a lot).
精彩评论