Hi.

Is there any way to the OK button, keep the focus to start the program,
and not the entry control?

Here Code:---------------------------------

#!/usr/bin/env python

import gtk

class Dialog:       
    def __init__(self):
        dialog = gtk.Dialog("Dialog Example", None, 0,
(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, gtk.STOCK_OK, gtk.RESPONSE_OK))
        dialog.set_default_size(250, 300)
        label = gtk.Entry()
        
        dialog.vbox.pack_start(label, True, True, 0)
        dialog.show_all()
        
        response = dialog.run()
        
        if response == gtk.RESPONSE_OK:
            print "OK"
        elif response == gtk.RESPONSE_CANCEL:
            print "CANCEL"
        
        dialog.destroy()

Dialog()


Thanks in advance!

Regards.

CRAF

_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Reply via email to