Python Forum

Full Version: Graphics CANVAS resolution
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Can someone tell me where to find the graphics canvas specifications from Python? If not may be can be explained?
I have looked everywhere and cannot find.
I am interested in:
1) Resolution when I open the canvas drawing area?
2) Left bottom corner should be dependent on screen resolution, but seems to be different on my computer. My graphics resolution is 2736x1824. When I plot a line in Turtle graphics I do not get that resolution.
3) How can I change screen graphic resolution?
4) A method that works to “get” graphic resolution? I have tried several from the internet, but they do not work correctly.
tkinter is python's packaged GUI and includes Canvas widget

Python has packaged tkinter in the general release for quite some time.
Unfortunately the documentation has been and still is lacking.

The 'bible' on tkinter was maintained for a long time by New Mexico tech, document written by John Shipman.

Alas, this is no longer maintained or even available at that site.
However, there is a good Canvas (and also tkinter in general) tutorial here: https://www.python-course.eu/tkinter_canvas.php

Also you can still find John Shipman's manual here: https://anzeljg.github.io/rin2/book2/240...index.html
where you can download it as a PDF. (a good idea)

Mind you, there are some caveats that you must work with.
Shipmans Documentation was for python 2.7 which is no longer supported, but this has little effect on Tkinter.
the only gotcha that I know about is on importing tkinter.
In python 2.7 it was import Tkinter with a capital T
in python 3, it is import tkinter with a small T

Shipman's documentation is still the most comprehensive ever put together, I use it all the time when writing tkinter.