rollover effect

Sorin Schwimmer sxn02 at yahoo.com
Mon Aug 28 10:57:56 EDT 2006


Hi,

For the right-click event, you should use a bind to
<Button-3>. If you have a new version of Python,
chances are that you already have Tix installed. Tix,
like Pmw, is an extension package for Tkinter, and it
also offers a Balloon widget.

See the following example:

<code>
from Tix import *

r=Tk()
l=Label(r,text='This is my label')

def fn(e):
  global l
  print 'Right clicked :-)'

l.bind('<Button-3>',fn)
l.grid()
b=Balloon(r)
b.bind_widget(l,balloonmsg='text in balloon')

r.mainloop()
</code>

If you're a beginer, than you may want to have a look
to some of the following links regarding Tkinter and
extensions:

http://www.pythonware.com/library/tkinter/introduction/index.htm
http://infohost.nmt.edu/tcc/help/pubs/tkinter/
http://www.ferg.org/thinking_in_tkinter/index.html
http://mail.python.org/pipermail/tkinter-discuss/
http://www.3dartist.com/WP/python/tknotes.htm
http://tkinter.unpy.net/wiki/FrontPage
http://www.faqts.com/knowledge_base/index.phtml/fid/264
http://pmw.sourceforge.net/doc/index.html
http://heim.ifi.uio.no/~hpl/Pmw.Blt/doc/
http://pmwcontribd.sourceforge.net/
http://tcltk.free.fr/blt/
http://tkinter.unpythonic.net/bwidget/BWman/
http://tcltk.free.fr/Bwidget/
http://tktreectrl.sourceforge.net/treectrl.html
http://tix.sourceforge.net/docs.shtml
http://groups.yahoo.com/group/tix/messages/1
http://cvs.sourceforge.net/viewcvs.py/tkta
http://www.tkzinc.org/ble/
http://tktreectrl.sourceforge.net/Understanding
TkTreeCtrl.html
http://cvs.sourceforge.net/viewcvs.py/*checkout*/tktable/tile-www/doc/index.html
http://wiki.tcl.tk/6172http://www.faqts.com/knowledge_base/view.phtml/aid/3728
http://www.faqts.com/knowledge_base/view.phtml/aid/3728

I see I have a rather long list of bookmarks ;-)

I hope this helps.

Sorin

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the Python-list mailing list