[Python] Tkinter: how to colorize the outline of a canvas rectangle?

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

  1. Stack

    Stack Membro Participativo

    I draw a rectangle on a Canvas:

    canvas = Canvas(parent, cursor="cross")
    rect = canvas.create_rectangle(20,20, 1, 1, fill="")


    I only want to draw the border, leaving the interior transparent (that is why I set fill="" as mentioned here).

    My problem:

    I want the rectangle to have a red border. How can I do that?

    Continue reading...

Compartilhe esta Página