On Tue, 1 Mar 2005 21:55:22 +0200 (SAST), Paul Malherbe
<[EMAIL PROTECTED]> wrote:

> What I am wanting to do is to disable the focus cycling facility of the
> TAB key. 

I think you should connect a key_press_event signal to the main window

self.win.connect("key_press_event", self.doKeyPress)

and then create a function that will evaluate which key is being
pressed, in case is the "Tab" key stop the emission, something like:

    def doKeyPress(self, widget, event):
        keyname = gtk.gdk.keyval_name(event.keyval)
        if keyname == 'Tab':
            self.win.stop_emission("key_press_event")

I don't know if is the best solution, maybe someone else have a better idea.

cheers
gmt
_______________________________________________
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to