rollover effect

Discussion in 'Python' started by Sorin Schwimmer, Aug 28, 2006.

  1. 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
     
    Sorin Schwimmer, Aug 28, 2006
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sandro

    rollover effect on a button?

    Sandro, Jan 14, 2005, in forum: Java
    Replies:
    2
    Views:
    429
    Andrew Thompson
    Jan 14, 2005
  2. groves

    rollover effect

    groves, Aug 26, 2006, in forum: Python
    Replies:
    13
    Views:
    555
    Diez B. Roggisch
    Aug 27, 2006
  3. Els
    Replies:
    2
    Views:
    987
    Tom Miller
    Apr 1, 2007
  4. Jeff
    Replies:
    1
    Views:
    382
    Luis Roquette Valdez
    Mar 21, 2009
  5. Replies:
    0
    Views:
    169
Loading...

Share This Page