GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Source-Code-from-Tutorials/PythonGTK/Examples/11_entry.py at master · omidnasri/Source-Code-from-Tutorials

Expand file tree

/

11_entry.py

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
39 lines (29 loc) · 1.05 KB
/

11_entry.py

Copy path

File metadata and controls

39 lines (29 loc) · 1.05 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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.