Jez, one thing you may want to think about is if there is a way to
implement the semantics in a way simular to how Windows Explorer
currently handles drag and drop for files in the Listview:

Right Click + drag  = Drop shows context menu with options: Copy Here,
Move Here, Create ShortCut Here, SEPARATOR, Cancel

Left Click + Drag = two options, depending on where the target is
dropped:  If dropped somewhere on the same drive, then it is a move.  If
dropped onto a different drive (or machine), then it is a copy.

"Perhaps" there should be a flag in the constructor to turn this
behaviour on an off.  Basically, if Win32::GUI can DWIM if the flag is
on, and let the user handle it via event handlers if it is off (default
to on?)

Anyway, just an idea....

Joe Frazier, Jr.
Senior Support Engineer

Peopleclick Service Support
Tel:  +1-800-841-2365
E-Mail: [EMAIL PROTECTED] 

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Jez White
> Sent: Monday, January 10, 2005 11:14 AM
> To: Lloyd, Steve; Chris Wearn; perl-win32-gui-users
> Subject: Re: [perl-win32-gui-users] Listview Control 
> functionality - Drag n Drop - Email found in subject
> 
> Hi,
> 
> Yes it can be added - Chris and came to a little 'agreement' 
> - he supplies an perl example and I'll add the code:)
> 
> The only issue is how to add support dragging with the right 
> mouse button. 
> How about something like this:
> 
> sub Drag_Hander {
>   my ($item,$button)[EMAIL PROTECTED];
>   if ($button==0) {
>     print 'Left button dragging';
>  }
> else {
>       print 'right button dragging';
> }
> }
> 
> In other words the second parameter is true (1) if it dragged 
> by the right mouse button.
> 
> Thoughs?
> 
> Cheers,
> 
> jez.
> ----- Original Message -----
> From: "Lloyd, Steve" <[EMAIL PROTECTED]>
> To: "Jez White" <[EMAIL PROTECTED]>; "Chris Wearn" 
> <[EMAIL PROTECTED]>; "perl-win32-gui-users" 
> <perl-win32-gui-users@lists.sourceforge.net>
> Sent: Monday, January 10, 2005 3:33 PM
> Subject: RE: [SPAM] - Re: [perl-win32-gui-users] Listview 
> Control functionality - Drag n Drop - Email found in subject
> 
> 
> This seems like a very useful add on code  -  can this be 
> added in so that those who do not have a compiler can get this?
> 
> 
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Jez White
> Sent: Saturday, January 08, 2005 3:03 AM
> To: Chris Wearn; perl-win32-gui-users
> Subject: [SPAM] - Re: [perl-win32-gui-users] Listview Control 
> functionality - Drag n Drop - Email found in subject
> 
> 
> Hi Chris,
> 
> > There are quite a few other Methods that appear on the MSDN site:
> >
> > 
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shell
> > cc/platform/commctls/listview/listview_message_processing.asp
> >
> > What is required or is there anything that prevents these methods 
> > being implemented (barring time, hardwork and knowledge) ?
> 
> Ok - I'll put myself on a limb and say this is "doable":) 
> Some of the functionality you would need is missing, while 
> others (handling the dragging of an image) is in place (I think)...
> 
> To get the Begin drag event add the code to the Listview.XS 
> below (it was just a quick hack, but it works):
> 
>     else if Parse_Event("BeginDrag",      PERLWIN32GUI_NEM_CONTROL8)
> 
> between the lines:
> 
>     else if Parse_Event("EndLabelEdit",   PERLWIN32GUI_NEM_CONTROL7)
>     else if Parse_Event("KeyDown",        PERLWIN32GUI_NEM_KEYDOWN)
> 
> Then add the following to the the ListViiew_onEvent function 
> in the main
> 
> switch:
> 
>         case LVN_BEGINDRAG:
>         /*
>          * (@)EVENT:BeginDrag(ITEM)
>          * some doco here...
>          * (@)APPLIES_TO:ListView
>          */
>           PerlResult = DoEvent(NOTXSCALL perlud, 
> PERLWIN32GUI_NEM_CONTROL8, "BeginDrag",
>                        PERLWIN32GUI_ARGTYPE_LONG, (LONG) 
> lv_notify->iItem,-1);
>         break;
> 
> We now have a new event handler called "BeginDrag" that can 
> be called by OEM and NEM event models:
> 
> sub lvwChart_BeginDrag {
>   my $item=shift;
>   print "perl dragging $item \n";
> }
> 
> So, now you know what item is being dragged, you'll need to 
> use the methods in the imagelist control to make a dragable 
> image. Once the user releases the mouse you'll know where the 
> item was dragged to.
> 
> And that should be it:) I think.
> 
> Hope this helps somewhat.
> 
> Cheers,
> 
> jez.
> 
> 
> 
> 
> 
> 
> 
> 
> -------------------------------------------------------
> The SF.Net email is sponsored by: Beat the post-holiday blues 
> Get a FREE limited edition SourceForge.net t-shirt from 
> ThinkGeek. It's fun and FREE -- well, 
> almost....http://www.thinkgeek.com/sfshirt
> _______________________________________________
> Perl-Win32-GUI-Users mailing list
> Perl-Win32-GUI-Users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
> 
> This email, and any files or previous email messages included 
> with it, may contain confidential and/or privileged material. 
> If you are not the intended recipient please contact the 
> sender and delete all copies.
> 
> 
> 
> -------------------------------------------------------
> The SF.Net email is sponsored by: Beat the post-holiday blues 
> Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
> It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
> _______________________________________________
> Perl-Win32-GUI-Users mailing list
> Perl-Win32-GUI-Users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
> 
> 
> 
> -------------------------------------------------------
> The SF.Net email is sponsored by: Beat the post-holiday blues 
> Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
> It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
> _______________________________________________
> Perl-Win32-GUI-Users mailing list
> Perl-Win32-GUI-Users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
> 

Reply via email to