Harshit Agarwal
Harshit Agarwal

Reputation: 47

I want to draw rectangle with double edges in Tkinter library in python?

I can draw rectangle with one edge using the below code

self.canvas.create_rectangle(
    self.start_x, self.start_y, self.end_x, self.end_y, outline="black", fill="grey", width=self.width)

But how to draw two edges like in weak entity in ER Diagram?

Upvotes: 0

Views: 249

Answers (1)

blueenvelope
blueenvelope

Reputation: 699

How about draw a second, slightly larger rectangle around the first?

self.canvas.create_rectangle(
    self.start_x - 0.02,
    self.start_y - 0.02,
    self.end_x + 0.02,
    self.end_y + 0.02,
    outline="black",
    fill="",
    width=self.width
)

Upvotes: 2

Related Questions