PMW widget - skip tabbing to it
jstroud at mbi.ucla.edu
Tue Mar 27 00:38:32 CEST 2007
> On Mar 26, 11:27 am, kyoso... at gmail.com wrote:
>>On Mar 26, 11:17 am, kyoso... at gmail.com wrote:
>>>On Mar 26, 10:51 am, "jp" <johnpe... at yahoo.com> wrote:
>>>>I have multiple PMW widgets (EntryFields, ScrolledField etc), how can
>>>>I skip over these widgets when using the tab key?
>>>I would probably write some custom event handling. Something that
>>>could tell it was a key-press event and not just an on-focus event.
>>>Then it would be a simple, if key-press == tab, put focus on next
> #> > widget of interest. Something like that should work.
>>I looked in my Tkinter book, and it says that if the widget has the
>>"takefocus" option set to true, the widget is placed in the tab group
>>and will get focus when they are tabbed to. I assume that this means
>>if you set the PMW widgets' "takefocus" option to false, they will be
>>skipped over since they won't be in the tab group.
> I've tried using the takefocus option set to 0 and 1 but either way,
> the tab key still stops at my EntryField. Below is my snippet of
> code. What am I doing wrong?
> labelpos = 'w',
> value = "",
> label_text =
> #entry.component('entry').takefocus = 1
> entry.component('entry').takefocus = 0
Are you sure you don't mean:
entry.component('entry')['takefocus'] = 0
which is equivalent to
More information about the Python-list