Skip to content

Commit 93c82b0

Browse files
committed
Added gui's folder
1 parent 3176250 commit 93c82b0

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

GUI's/gtk_01.py

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import gi
2+
gi.require_version('Gtk', '3.0')
3+
from gi.repository import Gtk
4+
5+
def test(button):
6+
print('The Button has been clicked!')
7+
8+
win = Gtk.Window()
9+
test_btn = Gtk.Button('Click Me...')
10+
win.add(test_btn)
11+
test_btn.connect("clicked", test)
12+
win.connect("destroy", Gtk.main_quit)
13+
win.show_all()
14+
Gtk.main()

GUI's/gtk_02.py

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import gi
2+
gi.require_version('Gtk', '3.0')
3+
from gi.repository import Gtk
4+
5+
def test(button):
6+
print('The Button has been clicked!')
7+
8+
win = Gtk.Window()
9+
grid = Gtk.Grid()
10+
win.add(grid)
11+
test_btn = Gtk.Button('Click Me...')
12+
test_btn.connect("clicked", test)
13+
test_btn2 = Gtk.Button('Click Me Again...')
14+
test_btn2.connect("clicked", test)
15+
grid.attach(test_btn, 0, 0, 1, 1)
16+
grid.attach(test_btn2, 1, 0, 1, 1)
17+
grid.attach(Gtk.Label('This Is A Test.'), 0, 1, 1, 1)
18+
win.connect("destroy", Gtk.main_quit)
19+
win.show_all()
20+
Gtk.main()

0 commit comments

Comments
 (0)