Drag and drop in Tkinter. How difficult is it?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Marc

    Drag and drop in Tkinter. How difficult is it?

    Hi all,

    I was thinking about developing a drag and drop application and was curious
    how difficult it is to do. Basically I want to have a set of objects that I
    move around the screen and drop into place.

    Anyone else ever done it? Got any tips?

    Thanks,
    Marc


  • Cameron Laird

    #2
    Re: Drag and drop in Tkinter. How difficult is it?

    In article <ApGdnUgAC6p1AM [email protected] m>,
    Marc <losnations@com cast.net> wrote:[color=blue]
    >Hi all,
    >
    >I was thinking about developing a drag and drop application and was curious
    >how difficult it is to do. Basically I want to have a set of objects that I
    >move around the screen and drop into place.[/color]

    Comment

    • Christos TZOTZIOY Georgiou

      #3
      Re: Drag and drop in Tkinter. How difficult is it?

      On Thu, 04 Sep 2003 09:14:08 -0000, rumours say that [email protected] om
      (Cameron Laird) might have written:
      [color=blue]
      >In article <ApGdnUgAC6p1AM [email protected] m>,
      >Marc <losnations@com cast.net> wrote:[/color]

      [Marc][color=blue][color=green]
      >>I was thinking about developing a drag and drop application and was curious
      >>how difficult it is to do. Basically I want to have a set of objects that I
      >>move around the screen and drop into place.[/color][/color]

      - Cameron -[color=blue]
      >LOTS of applications--several I've written, I
      >know--do this sort of thing. You'll need to
      >learn about bind(), and most likely the events
      > <1>
      > <B1-Motion>
      > <ButtonReleas e-1>
      >in particular: you'll teach <1> to start a
      >drag, <B1-Motion> to display the dragged object
      >moving around the screen, and <ButtonReleas e-1>
      >to finish the drop.
      >
      >Have you read <URL: http://
      >groups.google. com/groups?as_q=dra g+drop+tkinter& as_ugroup=comp. lang.python >?[/color]

      I should add that drag and drop in the same application can be done
      easily, but it's hard to do it between your application and others (too
      much window manager dependencies... )
      --
      TZOTZIOY, I speak England very best,
      Microsoft Security Alert: the Matrix began as open source.

      Comment

      • Cameron Laird

        #4
        Re: Drag and drop in Tkinter. How difficult is it?

        In article <qeselv8j6tgsg1 51ig4v55jdq5pmv [email protected]>,
        Christos "TZOTZIOY" Georgiou <[email protected]> wrote:

        Comment

        • Marc

          #5
          Re: Drag and drop in Tkinter. How difficult is it?

          Excellent. Thanks for the head start.

          A couple of questions.

          1) If I want to have a moving object, and not just a cursor that
          represents the moving object, do I need to continually pack and unpack
          the widget that holds the object and redraw it to give it the
          appearance of moving? I know sometimes the redrawing can cause
          applications to flicker too much, destroying the effect. I don't know
          if there's an optimum way to do this.

          2) Also, in reading I found an old module called Tkdnd (drag and
          drop). It was an experimental module that was supposed to be updated
          but never was. Now I can't find any more information on it. Does this
          module still exist or work?

          Thanks,
          Marc

          Comment

          • Michael Peuser

            #6
            Re: Drag and drop in Tkinter. How difficult is it?


            "Marc" <losnations@com cast.net> schrieb im Newsbeitrag
            news:ApGdnUgAC6 [email protected] m...[color=blue]
            > Hi all,
            >
            > I was thinking about developing a drag and drop application and was[/color]
            curious[color=blue]
            > how difficult it is to do. Basically I want to have a set of objects that[/color]
            I[color=blue]
            > move around the screen and drop into place.
            >
            > Anyone else ever done it? Got any tips?[/color]

            There is a nice example here using an as well nice Tree widget:


            Kindly
            Michael


            Comment

            • Cameron Laird

              #7
              Re: Drag and drop in Tkinter. How difficult is it?

              In article <4378fa6f.03090 41125.49b13fc7@ posting.google. com>,
              Marc <mnations@airma il.net> wrote:

              Comment

              • Cameron Laird

                #8
                Re: Drag and drop in Tkinter. How difficult is it?

                In article <4378fa6f.03090 41125.49b13fc7@ posting.google. com>,
                Marc <mnations@airma il.net> wrote:

                Comment

                • Michael Peuser

                  #9
                  Re: Drag and drop in Tkinter. How difficult is it?


                  "Marc" <mnations@airma il.net> schrieb im Newsbeitrag
                  news:4378fa6f.0 309041125.49b13 [email protected] gle.com...[color=blue]
                  > Excellent. Thanks for the head start.
                  >
                  > A couple of questions.[/color]

                  I think they will be answered when you look at the link (Tree.py) I posted
                  yesterday ;-)

                  Kindly
                  Michael P


                  Comment

                  Working...