Tkinter - One Canvas to Rule Them All?

Discussion in 'Python' started by Dave Harris, May 25, 2004.

  1. Dave Harris

    Dave Harris Guest

    I derived two Frame classes and created a Canvas in each. I was extremely
    surprised when frame1.canvas.delete('all') erased the image in
    frame2.canvas!

    I resolved my trouble by assigning tags and doing the deletion by tag. No
    big deal.

    I deduce from this behavior that there is a single database behind the
    scenes for the Canvas implementation.

    Just an observation. Maybe it will save somebody some head-scratching...

    Dave Harris
     
    Dave Harris, May 25, 2004
    #1
    1. Advertising

  2. Dave Harris

    Peter Otten Guest

    Dave Harris wrote:

    > I derived two Frame classes and created a Canvas in each. I was extremely
    > surprised when frame1.canvas.delete('all') erased the image in
    > frame2.canvas!


    Maybe you are accidentally deleting the last reference to the image (the
    canvas itself doesn't keep one). Care to show some code?

    > I deduce from this behavior that there is a single database behind the
    > scenes for the Canvas implementation.


    I can't confirm that.

    Peter
     
    Peter Otten, May 25, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Askari
    Replies:
    2
    Views:
    715
    Askari
    Aug 30, 2004
  2. Carl Cerecke
    Replies:
    2
    Views:
    834
    Carl Cerecke
    Jan 25, 2006
  3. Replies:
    0
    Views:
    1,371
  4. Replies:
    10
    Views:
    1,007
    Joseph Kesselman
    Mar 20, 2008
  5. Rainer Weikusat

    One 704 to rule them all

    Rainer Weikusat, Jul 26, 2013, in forum: Perl Misc
    Replies:
    0
    Views:
    174
    Rainer Weikusat
    Jul 26, 2013
Loading...

Share This Page