-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgui1.py
More file actions
29 lines (29 loc) · 1.02 KB
/
gui1.py
File metadata and controls
29 lines (29 loc) · 1.02 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
from tkinter import *
myG1=Tk()
myG2=Tk()
myG1.title("SProg")
myG2.title("CProg")
#20 and 70 are spawn points
myG1.geometry("500x500+100+50")
myG2.geometry("500x500+700+50")
a=StringVar()
#mainloop function is like getch()
def c1():
b=a.get()
lab1=Label(myG2,text=b).pack()
def c2():
lab2=Label(text="You used c2").pack()
myLb=Label(text="Hello all!!",fg='green',bg='black')
myLb.pack()
myLb2=Label(text="2nd label!",fg='red',bg='yellow').pack()
myLb3=Label(myG2,text="3rd label",fg="RED",bg="BLUE")
myLb3.place(x=300,y=450)
myLb4=Label(text="Placing!",fg='violet',bg='magenta').place(x=200,y=100)
#myLb5=Label(text="R=0,C=0!",fg='red',bg='blue').grid(row=0,column=0)
#myLb6=Label(text="R=1,C=0!",fg='violet',bg='magenta').grid(row=1,column=0,sticky="w")
myBut1=Button(text="Click",fg="Black",bg="Yellow",command=c1).place(x=20,y=40)
myBut2=Button(text="Enter",fg="Blue",bg="Yellow",font=30,command=c2).place(x=20,y=70)
Tx1=Entry().pack()
Tx2=Entry(textvariable=a).pack()
myG1.mainloop()
myG2.mainloop()