Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #41244

Re: how to couper contenier of a canvas in an outer canvas???

Newsgroups comp.lang.python
Date 2013-03-14 15:24 -0700
References <638062bb-68a0-49d0-b896-23015f7aa421@googlegroups.com>
Message-ID <1e71d1b8-f187-42e2-a4c2-87f97860dfb9@googlegroups.com> (permalink)
Subject Re: how to couper contenier of a canvas in an outer canvas???
From Rick Johnson <rantingrickjohnson@gmail.com>

Show all headers | View raw


On Thursday, March 14, 2013 7:16:05 AM UTC-5, olsr....@gmail.com wrote:
> how to couper all the obejcts in a canvas in an auther canvas?

Hmm, well before i can even start solving your problem, i'll need to spend some time figuring out what the hell you're problem is. o_O. "Maybe" you meant to say this:

> how to [copy] all the [canvas items] in [one] canvas [into another] canvas?

 "Ahhh, the sweet nectar of articulate communication!"

Why would you want to do that exactly? Hopefully you have a good reason. There are quite a few "canvas items" to consider:

    * arc objects
    * bitmap objects
    * image objects
    * line objects
    * oval objects
    * polygon objects
    * rectangle objects
    * text objects
    * window objects
    
There does not seem to be an easy way to do this via the Tkinter API (feel free to dig through the TCL/Tk docs if you like), however, if all you need to do is transfer a few simple primitives from one canvas to another, then the following (very general and admittedly quite naive) approach might get you there:

for object in canvas1
    # create newobject in canvas2
    # configure newobject 
    
But there are quite a few (very important) details that that little sample leaves out, for instance: tags, stacking orders, tag bindings, etc. 

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

how to couper contenier of a canvas in an outer canvas??? olsr.kamal@gmail.com - 2013-03-14 05:16 -0700
  Re: how to couper contenier of a canvas in an outer canvas??? Rick Johnson <rantingrickjohnson@gmail.com> - 2013-03-14 15:24 -0700
    Re: how to couper contenier of a canvas in an outer canvas??? alex23 <wuwei23@gmail.com> - 2013-03-14 18:07 -0700
      Re: how to couper contenier of a canvas in an outer canvas??? Chris Angelico <rosuav@gmail.com> - 2013-03-15 17:29 +1100
  Re: how to couper contenier of a canvas in an outer canvas??? olsr.kamal@gmail.com - 2013-03-15 05:00 -0700
    Re: how to couper contenier of a canvas in an outer canvas??? Stefan Behnel <stefan_ml@behnel.de> - 2013-03-15 13:18 +0100
    Re: how to couper contenier of a canvas in an outer canvas??? Dave Angel <davea@davea.name> - 2013-03-15 08:42 -0400
    Re: how to couper contenier of a canvas in an outer canvas??? Rick Johnson <rantingrickjohnson@gmail.com> - 2013-03-15 12:49 -0700
  Re: how to couper contenier of a canvas in an outer canvas??? rusi <rustompmody@gmail.com> - 2013-03-15 07:09 -0700
    Re: how to couper contenier of a canvas in an outer canvas??? Chris Angelico <rosuav@gmail.com> - 2013-03-16 01:56 +1100
    Re: how to couper contenier of a canvas in an outer canvas??? Rick Johnson <rantingrickjohnson@gmail.com> - 2013-03-15 13:46 -0700

csiph-web