[Python] How to make the corners of a text box rounded in Tkinter?

Discussão em 'Python' iniciado por Stack, Junho 20, 2025.

  1. Stack

    Stack Membro Participativo

    Here is my code -->

    import tkinter as tk
    from tkinter import ttk

    win = tk.Tk()
    WIDTH, HEIGHT = 500, 500
    win.geometry(f"{WIDTH}x{HEIGHT}")
    text = tk.Text(win, height=5, width=10)
    text.pack(side="bottom", fill="both")


    user = ttk.Label(text=" :You")
    user.pack(anchor="e")

    bot = ttk.Label(text="AI: ")
    bot.pack(anchor="nw")

    win.title("Chat Bot")
    win.mainloop()


    I tried using ttk.Style().

    Continue reading...

Compartilhe esta Página