Advertisement
plarmi

hw_11_3

Oct 25th, 2023
850
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.32 KB | None | 0 0
  1. import tkinter as tk
  2.  
  3. def draw_text(width, height, text):
  4.     root = tk.Tk()
  5.     root.title("Отображение текста")
  6.  
  7.     text_widget = tk.Text(root, width=width, height=height)
  8.     text_widget.pack()
  9.  
  10.     text_widget.insert(tk.END, text)
  11.  
  12.     root.mainloop()
  13.  
  14. draw_text(40, 10, "Привет мир")
  15.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement