Highlights & Cursors

Jeffrey jmsun at bioeng.ucsd.edu
Fri Feb 15 00:51:27 CET 2002


Lawrence Oluyede <rhymes at myself.com> wrote in message news:<0jun6ukqqtq58t1dh7ustpu06patd71d2s at 4ax.com>...
> I'm just learning Tkinter but I have a little problem.
> Can anyone of you explain me how to use the highlight
> for the focus in a widget and the cursor option?
> 
> Thanks in advance.

  I'm not quite sure I understand your question but I'll try to answer
your question.  The highlight on a widget occurs whenever one
mouses-over the widget.  The color that you what the highlight to be
depends on what you configure it to be .  For example if you have a
widget called some_widget, you would do something like
some_widget.configure( highlightcolor = 'red' ).

  In terms of cursors, that's a different story.  Note that this is
off the top of
my head.  But I'll assume that you are tyring to change the cursor? 
For the same widget, what you do is (this is off the top of my head)
some_widget.bind("Any-Enter", change_cursor_enter ) where
change_cursor is a function that changes the cursor to some other
special cursor.  Then you have to bind the other way around too like
some_widget.bind("Any-Leave", change_cursor_leave )....

  I hope I haven't been too confusing, and that I've been somewhat
helpful.
        
     Jeff



More information about the Python-list mailing list