PMW widget - skip tabbing to it

John McMonagle jmcmonagle at velseis.com.au
Mon Mar 26 18:41:14 EDT 2007


jp 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?
>>>> Thank you,
>>>> John

What version of Pmw are you using ?  Tabbing between widgets works fine 
on my system (Pmw 1.2,  tk 8.4, KDE)

I can change the focus behaviour by using the takefocus option.  You 
were on the right track, you just did it wrong (see code below):

########################################################################
from Tkinter import *
import Pmw

root = Tk()
entry = Pmw.EntryField(root, labelpos=W, value="", label_text='Name:')
entry.grid(row=1)
entry.component('entry').configure(takefocus=0)

Button(root,text='test1').grid(row=2)
Button(root,text='test2').grid(row=3)
Button(root,text='test3').grid(row=4)

root.mainloop()
#########################################################################

Regards,

John



More information about the Python-list mailing list