Hi wOOdy,

I had time today to look at it moreso.  Looks like you're using the classic Drag method vs OLEDragDrop.  Hey, whatever works!  Am I right to say that native Fox objects like this (as opposed to pictures or whatever) are better suited for the non-OLE Drag methods?

tia,
--Mike


On 5/4/2021 9:13 AM, MB Software Solutions, LLC wrote:
VERY COOL, wOOdy!!!!  How great that there's folks learning VFP yet. ;-)

I'll dig into this more later but at first try, this looks/works great.  An added bonus I wasn't seeing:  setting the Team Captain ("Team X: Name") from the grids as well including adding the guy to the group (grid) below if he's not yet on that team!!!  Great feature add!!!!!!

--Mike


On 5/4/2021 1:07 AM, Jürgen Wondzinski wrote:
Hi Mike

Funny, I just created a sample for you. See source here:
https://1drv.ms/u/s!AujNq3xu6Q4_nYk-vAOY_wxoN97qEw?e=uF4yXu

Just a Quick'nDirty Example how you could do a Drag'n'Drop with Grids.
In pure coincidence I had a trainee for VFP onmy side, thus we did a learning session out of it. We just recreated it based on your screenshot, we take no punishment for wrong scores or misspelled names :)

wOOdy


-----Ursprüngliche Nachricht-----
Von: ProFox <profox-boun...@leafe.com> Im Auftrag von MB Software Solutions, LLC
Gesendet: Dienstag, 4. Mai 2021 04:36
An: profox@leafe.com
Betreff: Re: Drag and Drop code

Done with grids instead: https://www.screencast.com/t/5X7Mn6QDb5

Honestly, I think I used listviews ONCE in my 26 year history of FoxPro, and that was to echo a processing status on a dedicated Report/Print Server using VFP5/6 on a Novell Netware client network at KePRO, Inc in Harrisburg, PA.  :D


On 5/3/2021 5:22 PM, MB Software Solutions, LLC wrote:
Hi wOOdy!

Oh believe me...grids would be SOOOO MUCH EASIER!!!!   I'm gonna
rebuild this with grids instead....but my meeting with the Team
Captains was tonight at 8pm so I wasn't sure I'd get it done in time.
SWMBO wants to go grab some dinner now too.  Ugh.

Yes...I wanted to grab between sources to "trade" players from one
listbox/grid to the other.


On 5/3/2021 4:59 PM, Jürgen Wondzinski wrote:
Just wondering:
Why not use Grids with AllowCellSelection = .f. and HighLightStyle = 2 ?
You'll get so much more possibilities (optical as well as technical)
in comparison to Listboxes

But back to your problem:
So you want to drag players from the left list to any of those Team
groups as well as criss-cross ?

wOOdy


-----Ursprüngliche Nachricht-----
Von: ProFox <profox-boun...@leafe.com> Im Auftrag von MB Software
Solutions, LLC
Gesendet: Montag, 3. Mai 2021 21:44
An: ProFox Email List <profox@leafe.com>
Betreff: Drag and Drop code

Many many moons ago I did some drag and drop code, but I have
forgotten completely and it's no longer in my possession anyway. I
want to drag names amongst a screen full of listboxes:
https://www.screencast.com/t/6M8XxvSFV

I know I need to code in the OLEDragDrop event and native VFP Help
sucks, not really showing me anything.

I was thinking the oDataObject was the listbox where the drag started
but no.  I tried to SET STEP ON but VFP says "CANCEL or SUSPEND is
not allowed."

LPARAMETERS oDataObject, nEffect, nButton, nShift, nXCoord, nYCoord
LOCAL loLB as ListBox loLB = oDataObject wait window loLB.ListCount
&& this fails

SET STEP ON  && this doesn't work either


I have the properties set correctly to allow me to drag from one list
to another but now I'm stuck.  Going to search the archives next but
throwing this out there in the meantime.  Was hoping to have
drag/drop implemented by the time I had a ZOOM call with my fellow
hockey captains to set the teams tonight!

tia,
--Michael



--
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus


[excessive quoting removed by server]

_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: https://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: https://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: https://leafe.com/archives
This message: 
https://leafe.com/archives/byMID/971c5dfe-9bc6-e856-9de4-2c4942544...@mbsoftwaresolutions.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to