We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 27d8016 commit 8a60fd1Copy full SHA for 8a60fd1
snippets/python/[tkinter]/basics/hello-world.md
@@ -0,0 +1,22 @@
1
+---
2
+title: Hello, World!
3
+description: Creates a basic Tkinter window with a "Hello, World!" label.
4
+author: Legopitstop
5
+tags: app,hello-world,object-oriented
6
7
+
8
+```py
9
+from tkinter import Tk, Label
10
11
+class App(Tk):
12
+ def __init__(self):
13
+ Tk.__init__(self)
14
+ self.geometry("100x100")
15
16
+ self.lbl = Label(self, text='Hello, World!')
17
+ self.lbl.pack(expand=1)
18
19
+# Usage:
20
+root = App()
21
+root.mainloop()
22
+```
snippets/python/[tkinter]/icon.svg
0 commit comments