Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > rollover effect

Reply
Thread Tools

rollover effect

 
 
Sorin Schwimmer
Guest
Posts: n/a
 
      08-28-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/tk...tion/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.p...doc/index.html
http://wiki.tcl.tk/6172http://www.fa...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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem creating css rollover effect! Jeff ASP .Net 1 03-21-2009 11:44 PM
Simple Rollover Menu effect Els HTML 2 04-01-2007 09:45 PM
rollover effect groves Python 13 08-26-2006 11:45 PM
Floating menu with disjointed rollover effect jonvillalva@gmail.com Javascript 0 06-15-2006 03:38 PM
rollover effect on a button? Sandro Java 2 01-14-2005 11:03 PM



Advertisments