-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtkinter_screen.py
More file actions
36 lines (24 loc) · 1.01 KB
/
tkinter_screen.py
File metadata and controls
36 lines (24 loc) · 1.01 KB
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
from tkinter import *
import arduino
root = Tk()
root.geometry("1200x800")
serial_com = arduino.SerialCom()
def my_click():
hello = "Hello "+tkVar.get()
myLabel = Label(root, text=hello)
myLabel.pack()
def window_init():
# create main panel
mainPanedWindow = PanedWindow(bd=4, orient=HORIZONTAL, relief=RAISED, bg="white")
mainPanedWindow.pack(fill=BOTH, expand=True)
window_left = PanedWindow(mainPanedWindow, height=100, relief=SUNKEN, orient=VERTICAL, bg="white")
window_right = PanedWindow(mainPanedWindow, width=200, relief=SUNKEN, bg="grey")
mainPanedWindow.add(window_left, stretch="always")
mainPanedWindow.add(window_right, stretch="never")
left_top = PanedWindow(window_left, width=300, height=300, relief=SUNKEN, bg="white")
left_bottom = PanedWindow(window_left, height=200, relief=SUNKEN, bg="black")
window_left.add(left_top, stretch="always")
window_left.add(left_bottom, stretch="never")
if __name__ == "__main__":
window_init()
root.mainloop()