Advertisement
plirof2

python3 python-gui-maker tkinter

May 4th, 2023 (edited)
780
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.05 KB | None | 0 0
  1. #python3 GUI sample
  2. # file made using
  3. # https://github.com/the-pythonist/python-gui-maker
  4. # tkinter using sudo apt-get install python3-tk
  5. # also try : https://sourceforge.net/projects/page/
  6. from tkinter import *
  7. from tkinter import font
  8.  
  9. windowDesign = Tk()
  10.  
  11. windowDesign.title('Design Window')
  12. windowDesign.geometry('512x489+227+228')
  13.  
  14. def btn1command():      # Command for Button1
  15.     Button2.config(text="hello button 1 pressed")
  16.     Text1.insert("end-1c", 'button 1 pressed')
  17. Button1 = Button(font = 'TkDefaultFont', image = '', takefocus = True, text = 'ok', command = btn1command)
  18. Button1.place(x = 73, y = 134, height = 30, width = 70, anchor = 'nw')
  19. Button2 = Button(font = 'TkDefaultFont', image = '', takefocus = True, text = 'Button2', )
  20. Button2.place(x = 224, y = 343, height = 30, width = 70, anchor = 'nw')
  21. Text1 = Text(autoseparators = True, blockcursor = True, exportselection = True, font = 'TkDefaultFont', takefocus = True, undo = True, )
  22. Text1.place(x = 162, y = 34, height = 300, width = 300, anchor = 'nw')
  23.  
  24.  
  25.  
  26. windowDesign.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement