Thank you Alan, I'll test this out.
-Philip
---------- Original Message ---------- From: "Alan Bourke" alanpbourke@fastmail.fm To: profoxtech@leafe.com Subject: Re: Grid with Drag and Drop rows Date: Mon, 12 May 2025 09:00:32 +0100
Maybe GridHitTest() can help.
https://hackfox.github.io/section4/s4g787.html
Hey there Philip - after I saw your reply this morning - it got me curious.
So, I decided to look at the link that Alan shared. But, honestly - Alan - after reading all the text on that webpage about this command usage - It SEEMS that it's not the answer that Philip is looking for. Will be honest - I didn't actually TRY the command, and maybe it might help out Philip.
However, based upon reading over that webpage - it does not seem that it would allow you to actually move rows of data up or down.
That being said...
Maybe the GridHitTest() command could be used to implement some kind of Row swapping. Like, once you call that routine - you can then capture what Cell & Row you are on, and that if you do another usage of the command - maybe you could find out like the Direction the mouse was moving - like was it going in a Positive or Negative type direction - to determine if the user wants to move a row Downwards or Upwards.
But, you may have to do some very Creative type coding. For instance - have an extra field in the data that has like a Row # in it - but, it's NOT displayed in the Grid. Then, based upon what I previously wrote above and how to do the testing of location and movement - you could Swap the Row #'s in the data - then Refresh the Grid. And, of course, yes - it would mean that the Index for the data would be based upon this kind of Row #.
Anyway - it's just a thought...
-K
________________________________________ From: ProFox on behalf of Philip Borkholder Sent: Wednesday, May 14, 2025 9:31 AM To: profox@leafe.com Subject: Re: Grid with Drag and Drop rows
Thank you Alan, I'll test this out.
-Philip
---------- Original Message ---------- From: "Alan Bourke" alanpbourke@fastmail.fm To: profoxtech@leafe.com Subject: Re: Grid with Drag and Drop rows Date: Mon, 12 May 2025 09:00:32 +0100
Maybe GridHitTest() can help.
https://hackfox.github.io/section4/s4g787.html
-- Alan Bourke alanpbourke (at) fastmail (dot) fm [excessive quoting removed by server]