Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #python3 GUI sample
- # file made using
- # https://github.com/the-pythonist/python-gui-maker
- # tkinter using sudo apt-get install python3-tk
- # also try : https://sourceforge.net/projects/page/
- from tkinter import *
- from tkinter import font
- windowDesign = Tk()
- windowDesign.title('Design Window')
- windowDesign.geometry('512x489+227+228')
- def btn1command(): # Command for Button1
- Button2.config(text="hello button 1 pressed")
- Text1.insert("end-1c", 'button 1 pressed')
- Button1 = Button(font = 'TkDefaultFont', image = '', takefocus = True, text = 'ok', command = btn1command)
- Button1.place(x = 73, y = 134, height = 30, width = 70, anchor = 'nw')
- Button2 = Button(font = 'TkDefaultFont', image = '', takefocus = True, text = 'Button2', )
- Button2.place(x = 224, y = 343, height = 30, width = 70, anchor = 'nw')
- Text1 = Text(autoseparators = True, blockcursor = True, exportselection = True, font = 'TkDefaultFont', takefocus = True, undo = True, )
- Text1.place(x = 162, y = 34, height = 300, width = 300, anchor = 'nw')
- windowDesign.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement