How big is that canvas in the window?
koen at behindthesofa.dhs.org
Sun Aug 26 14:12:52 CEST 2001
Joseph Andrew Knapka <jknapka at earthlink.net> wrote in message news:<3B86C522.169F2868 at earthlink.net>...
> Bob Greschke wrote:
> > Here's the idea:
> > www.passcal.nmt.edu/~bob/unlinked/images/trdpy.jpg
> > It's in Python/Tkinter. See the "Plot" button? I want to draw a
> > graph in the black area. How do I find out the dimensions of the
> > black canvas area??? I can make a guess when I first draw everything
> > by setting the size of everything, but I don't want to do that. I
> > want the user to be able to resize the window and then redraw the
> > graph. I got to exactly this same point in GTK+ and had to give up.
> > Am I going to have to write this program in Java?? :-)
> > (The program is actually being written for/on a UNIX box. I just had
> > to use a Windows machine to get the screen dump.)
> > Thanks!
>>> from Tkinter import *
>>> root = Tk()
>>> canv = Canvas(root)
Section "Basic Widget Methods"
Please bookmark this site: a lifesaver when programming with Tkinter.
More information about the Python-list