-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathguitest.py
More file actions
26 lines (22 loc) · 881 Bytes
/
Copy pathguitest.py
File metadata and controls
26 lines (22 loc) · 881 Bytes
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
import Tkinter as tk
from Tkinter import N, E, S, W, NE, NW, SE, SW, NSEW, EW, NS
import ttk
class MainApplication(ttk.Frame):
def __init__(self, parent, *args, **kwargs):
ttk.Frame.__init__(self, parent, *args, **kwargs)
self.parent = parent
self.padding = (3,3,3,3)
self.rowconfigure(0,weight=1)
self.columnconfigure(0,weight=1)
self.grid(padx=5, pady=5, sticky=NSEW)
self.relief = "solid"
self.borderwidth = 5
ttk.Label(self, text="Hello world").grid(row=0, column=0)
for child in self.winfo_children(): child.grid_configure(padx=5, pady=5)
if __name__ == "__main__":
root = tk.Tk()
root.title("Hello World Application")
root.rowconfigure(0,weight=1)
root.columnconfigure(0,weight=1)
MainApplication(root) #.pack(side="top", fill="both", expand=True)
root.mainloop()