Advertisement
Rnery

Tkinter focus...

Sep 9th, 2021 (edited)
210
1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.61 KB | Source Code | 1 0
  1. #!/usr/bin/env python3
  2. # -*- coding: utf-8 -*-
  3.  
  4. import tkinter as tk
  5.  
  6. root = tk.Tk()
  7.  
  8. entry = tk.Entry(root)
  9. entry.place(x = '12', y = '50')
  10.  
  11. #  O segredo tá aqui no Justify
  12. entry.configure(justify = 'right', relief = 'ridge',
  13.         font = ("Serif", 14), fg = '#808080')
  14.  
  15. button = tk.Button(root, width = '5', height = '1', text = 'ok')
  16. button.place(x = '185', y = '85')
  17. button.configure(font = ("Serif", 10), fg = '#808080')
  18.  
  19. root.title('Tkinter - Focus')
  20. root.resizable(False, False)
  21. root.config(background = 'white')
  22. root.geometry('250x200')
  23. root.eval('tk::PlaceWindow . center')
  24. root.mainloop()
  25.  
Tags: python tkinter
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement