May-04-2022, 07:23 AM
Hi,
I have an app with a large canvas, showing images.
The canvas is configured:
print('w:',tifCanvas.winfo_reqwidth(),'h:',tifCanvas.winfo_reqheight())
It says : 1204 x 954. OK, so far, so good.
But my monitor is much bigger (1920 x 1200)
When I click (top right) to maximize my app window to fit the monitor,
the canvas clearly gets bigger (fill BOTH), the image stays the same, and when i click a secret button
to print the canvas size at that moment, it slill says: 1204 x 954.
If i can get the correct canvas size at any moment, i could resize my image to be bigger.
But how to find it?
thx,
Paul
I have an app with a large canvas, showing images.
The canvas is configured:
tifCanvas = Canvas(root, width = 1200, height = 950, relief=RAISED,bg='lightgreen') tifCanvas.pack(side=LEFT,fill=BOTH,padx=10,pady=10)I can check this when the app starts by printing:
print('w:',tifCanvas.winfo_reqwidth(),'h:',tifCanvas.winfo_reqheight())
It says : 1204 x 954. OK, so far, so good.
But my monitor is much bigger (1920 x 1200)
When I click (top right) to maximize my app window to fit the monitor,
the canvas clearly gets bigger (fill BOTH), the image stays the same, and when i click a secret button
to print the canvas size at that moment, it slill says: 1204 x 954.
If i can get the correct canvas size at any moment, i could resize my image to be bigger.
But how to find it?
thx,
Paul