# PythonGUI
import tkinter as tk # tk inter
class App:
def __init__(self, root):
# label
label1=tk.Label(root, text='Hello Tkinter') # labelHello Tkinter
label1.pack() # label
# button
# buttonactivebackground,activeforebackground,bd,bg,conmmand,fg,font,height,
# highlightcolor,image,justifyLEFT\RIGHT\CENTER,padx,pady(XY)
# reliefFLAT\SUNKEN\RAISED\GROOVE\RIDGE,stateNORMAL\ACTIVE\DISABLED
# ,underline,width,wraplength,text,anchor_
button1 = tk.Button(root,
text='Button1',
bg='blue',
fg='orange',
height=3,
width=20)
button1.pack(side=tk.LEFT) # button1
button2 = tk.Button(root,
text='2',
bg='green',
fg='grey',
activebackground='red')
button2.pack(side=tk.RIGHT) # button2
button3 = tk.Button(root,
text='',
fg='purple',
command=self.buttoncall)
# commandbuttoncall
button3.pack()
def buttoncall(self):
# button
print("Python command", "")
root = tk.Tk()
app = App(root)
root.mainloop() #