Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Dragging/Dropping images with Tk

by stefp (Vicar)
on Jul 06, 2002 at 18:57 UTC ( [id://179864]=note: print w/replies, xml ) Need Help??


in reply to Dragging/Dropping images with Tk

You should look dnd_demo that contains a pod. It is part of the tarball but, like the other demos, is not installed. You should also read the Tk::DropSite doc.

-- stefp -- check out TeXmacs wiki

Replies are listed 'Best First'.
Re: Re: Dragging/Dropping images with Tk
by dimmesdale (Friar) on Jul 06, 2002 at 19:31 UTC
    Thanks.

    But, where do I find dnd_demo (not anywhere on my sytem, CPAN, or this site, and a web search would turn up non-domain results--i.e., the game dungeons and dragons, dnd).

    Also, the T::DropSite doc didn't tell me much (aside from the pod commands, the only real 'meat' was:

    use Tk::DropSite qw(...); $widget->DropSite(-entercommand => ..., -dropcommand => ..., -motioncommand => ..., -dropcommand => ..., );
    Which doesn't exactly tell me much on the way of what the things do -- and trying to run a simple call resulted in an error)

    I don't have the latest version of Perl/Tk if that's a probelm (the only way to get it for active state is to have VC++, recommended v.6, if another way I'd be glad to know)

      As I messaged you, you can handle tarballs with winzip. Also, you can search Tk related packages on search.cpan.org. Tk-DKW seems a good complement to raw Tk, specially TK::IconCanvas even if the documentation is... sketchy.

      I am not a windows user so I would not dare to ask you to switch from ActiveState ppm to the cpan installer. This subjet has probably be treated before...

      -- stefp -- check out TeXmacs wiki

      It is years I have not used Tk so I read some docs to refresh my memory. I would indeed implement the "table" with a Tk::Canvas and the cards with bitmaps items. You need to add handlers to move the cards. I will probably send some some code if I can get some juice from my brain cells.

      I first thought using TopLevel windows for moved cards and using Tk::wm overrideredirect to ask the window manager not to decorate the said windows/cards, But this is more complex and does probably work only on X-Window.

      -- stefp -- check out TeXmacs wiki

        I don't know if its a big deal, but the cards are Photo types (they're .gif so Bitmap wouldn't be appropriate I don't think, and as the book I got tells me, bitmap isn't what the 'Windows' world thinks of, so I couldn't just convert it using Paint Shop Pro, for example).

        Thanks though, I'll go off to re-read on TK::Canvas and "table".

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://179864]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2024-04-25 10:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found