[Tutor] Change the font size of the lines and rectangle on aTkinter Canvas

Asrarahmed Kadri ajkadri at googlemail.com
Tue Jan 16 10:37:24 CET 2007


I want to change the coordinates because I was under the wrong impression;
when I gave some thought then only I realised that the COORDINATES need to
be changed in order to increase the dimensions of the GRAPH and in turn the
entire frame, canvas, and the toplevel window that is holding the frame and
the canvas..

Is there a method that redraws the toplevel windows that is holding the
widgets....

If yes, then can you suggest me how to do it..

Thanks in anticipation.

Regards,
Asrarahmed Kadri


On 1/16/07, Alan Gauld <alan.gauld at btinternet.com> wrote:
>
>
> "Asrarahmed Kadri" <ajkadri at googlemail.com> wrote
>
> > I want to provide with a functionality of changing the font size, in
> > this
> > case the width of the lines.
> Its not really the font size. fonts only apply to text, its only
> the line width you want to change. However todo that I
> think the easiest way is just to elete the existing line
> (and maybe the whole graph) and redraw with the new
> parameters. Provideed the data has been precalculated
> then this should be a rapid operation.
>
>
> > Is it possible to do it dynamically; I mean the graph is
> > already drawn, now with a Menu, suppose I want to
> > provide the user with options of 50%, 100%
> > and 200% font size.
>
> You will need to store the line thicknesses in variables
> so that the drawing routine can be parameter driven. Then
> simply delete the existing graph and redraw it with the
> new thickness - remember you may need to rescale
> your axis to cater for thicker/thinner lines.
>
> If you are using a filled Rectangle rather than a real line
> (which is what I would actually expect to see in a bar chart)
> then obviously the line thickness simply involves setting
> the difference in the y coordinates appropriately.
>
> Alan G.
>
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
>



-- 
To HIM you shall return.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20070116/c9860c00/attachment.htm 


More information about the Tutor mailing list