[pygtk] Widgets not respect can focus = False
Maximiliano Robaina
maxi_robaina at yahoo.com.ar
Tue Jan 29 19:44:18 WST 2008
I attach a minimal test case.
It's a simple GtkWindow, one label, two edits, and two buttons (button1 =
and button2)
button1 is setting with Can Focus=3DNo and Has Focus=3DNo
button2, Can Focus=3DYes and Has Focus=3DNo.
The tab order secuence is the standar (top to bottom). First, the active =
focus constrol is entry1. When I press tab key the focus change to entry2.
Now, when I press tab key, the next active control must be button2, =
because button1 has CanFocus=3D False but button1 get focus.
I hope be clear.
Regards.
------------ pr=F3xima parte ------------
import gtk
import gtk.glade
class MainWin(object):
def __init__(self):
xml =3D gtk.glade.XML('..\glade\win_test.glade')
win =3D xml.get_widget('window1')
=
xml.signal_autoconnect({
"key_press_event": self.key_press,
"destroy_event": gtk.main_quit})
=
def key_press(widget,event):
print event.keyeval
if __name__ =3D=3D '__main__':
w =3D MainWin()
gtk.main()
------------ pr=F3xima parte ------------
Se ha borrado un mensaje que no est? en formato texto plano...
Nombre : win_test.glade
Tipo : text/xml
Tama?o : 4937 bytes
Descripci?n: no disponible
Url : http://www.daa.com.au/pipermail/pygtk/attachments/20080129/31b=
c708b/win_test.bin
More information about the pygtk
mailing list