GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Source-Code-from-Tutorials/PythonGTK/Examples/11_entry.py at master · 4CGO/Source-Code-from-Tutorials Expand file tree/ Copy path11_entry.pyMore file actions 39 lines (29 loc) · 1.05 KB / Copy path11_entry.pyFile metadata and controls39 lines (29 loc) · 1.05 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 from gi.repository import Gtk class UserInput(Gtk.Window): def __init__(self): Gtk.Window.__init__(self, title="Messenger 2.0") self.set_border_width(10) self.set_size_request(200, 100) # Layout vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=6) self.add(vbox) # Username self.username = Gtk.Entry() self.username.set_text("Username") vbox.pack_start(self.username, True, True, 0) # Password self.password = Gtk.Entry() self.password.set_text("Password") self.password.set_visibility(False) vbox.pack_start(self.password, True, True, 0) # Sign In Button self.button = Gtk.Button(label="Sign In") self.button.connect("clicked", self.sign_in) vbox.pack_start(self.button, True, True, 0) def sign_in(self, widget): print(self.username.get_text()) print(self.password.get_text()) window = UserInput() window.connect("delete-event", Gtk.main_quit) window.show_all() Gtk.main() |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |