FAQ
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.

--
Lawrence "Rhymes" Oluyede (rhymes at myself.com)
"Per cambiare, per diventare un'altra
cosa dobbiamo prima sapere cosa siamo"
(Bruce Lee)

Search Discussions

  • Jeffrey at Feb 14, 2002 at 11:51 pm
    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
  • Lawrence Oluyede at Feb 15, 2002 at 7:51 pm

    On 14 Feb 2002 15:51:27 -0800, jmsun at bioeng.ucsd.edu (Jeffrey) wrote:

    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 )....
    My question is: how can i change the cursor in a frame or some others
    widgets?

    In the doc "an-introduction-to-tkinter" downloaded from pythonware.com
    there is a chapter explaining the widget styling (ch. 6).
    The last paragraph is about the cursor styles

    Here is the paragraph:

    "
    The cursor option control which mouse cursor to use when the mouse is
    moved over the
    widget. If this option isn't set, the widget uses the same mouse
    pointer as its parent.
    Note that some widgets, including the Text and Entry widgets, set this
    option by default.

    "

    how could i change this option?

    --
    Lawrence "Rhymes" Oluyede (rhymes at myself.com)
    "Per cambiare, per diventare un'altra
    cosa dobbiamo prima sapere cosa siamo"
    (Bruce Lee)
  • J.Jacob at Feb 15, 2002 at 11:01 pm
    [Lawrence Oluyede]
    My question is: how can i change the cursor in a frame or some others
    widgets?
    You mean this ?

    from Tkinter import *
    widget = Button(text='new cursor', padx, pady=4)
    widget.pack()
    widget.config(cursor='cross') # others: 'gumby' 'hand2' 'pencil'
    'watch'
    mainloop()

    Don't ask me the best place to look up Tkinter things like this on the
    internet i am still looking for that myself :)
  • Lawrence Oluyede at Feb 16, 2002 at 1:42 pm

    On 15 Feb 2002 15:01:12 -0800, joost_jacob at hotmail.com (J.Jacob) wrote:

    from Tkinter import *
    widget = Button(text='new cursor', padx, pady=4)
    widget.pack()
    widget.config(cursor='cross') # others: 'gumby' 'hand2' 'pencil'
    'watch'
    mainloop()
    Thanks

    ----
    Lawrence "Rhymes" Oluyede
    rhymes at myself.com
  • Laura Creighton at Feb 17, 2002 at 1:50 pm

    [Lawrence Oluyede]
    My question is: how can i change the cursor in a frame or some others
    widgets?
    You mean this ?

    from Tkinter import *
    widget = Button(text='new cursor', padx, pady=4)
    widget.pack()
    widget.config(cursor='cross') # others: 'gumby' 'hand2' 'pencil'
    'watch'
    mainloop()

    Don't ask me the best place to look up Tkinter things like this on the
    internet i am still looking for that myself :)
    Get John Shipman's 84 page guide.
    http://www.nmt.edu/tcc/help/lang/python/tkinter.html
    This is on page 9

    Laura Creighton
  • Lawrence Oluyede at Feb 17, 2002 at 2:37 pm

    On Sun, 17 Feb 2002 14:50:53 +0100, Laura Creighton wrote:

    Get John Shipman's 84 page guide.
    http://www.nmt.edu/tcc/help/lang/python/tkinter.html
    This is on page 9
    thanks i got it

    ----
    Lawrence "Rhymes" Oluyede
    rhymes at myself.com

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedFeb 14, '02 at 6:43p
activeFeb 17, '02 at 2:37p
posts7
users4
websitepython.org

People

Translate

site design / logo © 2022 Grokbase