Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/data/en/tutorials/Tutorial_09_gtk_entry.py
blob: 40873bf600fbe2f2845f17baceb9abf91d17f98e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from gi.repository import Gtk

class PyApp(Gtk.Window):
    def __init__(self):
        super(PyApp, self).__init__()
        self.set_title("Hello World!!")
        self.connect("destroy", Gtk.main_quit)
        self.set_size_request(250, 150)
        self.set_position(Gtk.WIN_POS_CENTER)
        
        entry = Gtk.Entry()
        fixed = Gtk.Fixed()
        fixed.put(entry, 20, 30)
        self.connect("destroy", Gtk.main_quit)
        self.add(fixed)
        self.show()

PyApp()
Gtk.main()