[Tutor] Change the font size of the lines and rectangle on aTkinter Canvas
alan.gauld at btinternet.com
Tue Jan 16 10:59:49 CET 2007
"Michael Lange" <klappnase at freenet.de> wrote
> If you only want to be able to resize the graph elements
> into half and double size it is probably easiest to use the
> Canvas.scale() method for this, like
>>>> from Tkinter import *
>>>> c.pack(fill='both', expand=1)
>>>> r = c.create_rectangle(20, 20, 70, 30, fill='red')
>>>> c.scale(r, 20, 20, 2, 2)
>>>> c.scale(r, 20, 20, 0.5, 0.5)
Neat! I haven't noticed scale() before.
Thanks for pointing it out.
More information about the Tutor