How can I set a GTK entry as default activated element / widget on start so I can insert my text without click into the entry widget first?
For example, when I start this script I want to insert into entry2 by default:
#!/usr/bin/python
# -*- coding: utf-8 -*-
import gtk
window = gtk.Window(gtk.WINDOW_TOPLEVEL)
mainbox = gtk.VBox()
window.add(mainbox)
mainbox.pack_start(gtk.Label("Label 1"))
entry1 = gtk.Entry()
mainbox.pack_start(entry1)
mainbox.pack_start(gtk.Label("Label 2"))
entry2 = gtk.Entry()
mainbox.pack_start(entry2)
window.show_all()
gtk.main()
I could not find an option: