In a Python BeeWare project, I want to use the toga.Canvas to draw some horizontal rectangles but I don’t know from where to get the Canvas width. I can’t find any documentation of the toga.Canvas() dimensions on the internet…
def redraw_canvas(self):
x = 4; y = 4;
for i in range(7):
with self.canvas.context.Fill(color=self.clRowBkg) as fill:
fill.rect(x, y, 100, self.row_height)
y += self.row_height + 4