[RE-OPENED] Drag&Drop in Iconview |
Post Reply |
Author | |
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
Posted: 02 July 2011 at 3:26am |
Hi,
Just one question: Is Drag&Drop supported in iconview?
Thanks
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi,
This is possible
Just set:
Just what I need, so this has been solved the "easy way"
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi,
I didn't see that Records are removed from the collection and "inserted" on new position... That is what I don't need!!!
This is what I need and hopefully someone has an idea or two
How can I drag & drop without changing the original record collection? I just need to change the order of the icons.
Thanks a lot in advance
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
If you can put together a small sample in IconView with icons, I can experiment for you. I've never really used IconView, so I don't want to spend too much time getting that up and running, I'd rather focus on the drag & drop part.
|
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi Jason,
I really hope you have a solution, in this case I would be happy with any workaround until Andre comes up with something
Here it is... uploads/3701/TestIconViewDragDrop.zip
Thanks a lot in advance
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
I haven't found anything too easy so far, but I have a couple of questions:
1) Why do you need the records collection to be in the same order before and after you move records? 2) Are you trying to have 2 different orders that records appear, one for icon view and one for report view? If I can understand what you are trying to accomplish, I might come up with a different approach. For example, you can save the order of the records collection before the drop is completed in the DropRecordsEx. Something like:
Then in the RecordsDropped event, you can get the post-dropped order to do comparisons against the pre-dropped order. |
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi Jason,
1) Why do you need the records collection to be in the same order before and after you move records?
Because I have a view which is loaded from a database and I use the record index as a key to control external connected items (for example a doorlock). The customer asked if he could change the layout of the items (icons) so the only thing I can do is changing the visual appearance (basicly changing the sortorder) I could easely create a form which will load same view only to change the sortorder (setting new .SortPriority for the reportitems) and save that into the database and in "working" view but I don't want to do that maybe as a last resort
2) Are you trying to have 2 different orders that records appear, one for icon view and one for report view? Just one view (see explanation in 1)
btw Why choose such name for enum, xtpReportAllowDragMove, it's still copying a record from one place to another. I know you have to check Help first but what a way to name an enum (I feel most enums for D&D are chosen with a raffle )
Thanks
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
Could you use the Tag property of each ReportRecord to store the database ID? It might be easier than trying to fight the Drag & Drop implementation...so the Records collection order will change on Drop, and you can traverse the collection and test against the Tag property to find the database record index.
|
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
I would prefer if there would be a setting where only the records would be moved. I never used D&D before so I can't tell if it worked before (ever...)
Andre??? I don't mind if you join this discussion...
Thanks a lot Jason, for the replies, I will see what I can do and maybe just maybe Andre will have the "perfect" solution. (read: implementation ) within next release...
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
I was working on Drag & Drop with you-know-who a long time ago, but it was so painful, I gave up after a while. Maybe we can pick things up again with Andre.
I would prefer if there would be a setting where only the records would be moved I'm a bit confused because as far as I can tell only the records are being move. What else is being moved that I am missing? -- I've attached a slightly modified demo that tries to preserve the Record positions, by intercepting the DragDrop and modifies the SortPriority on the fly. It seems to work, but only once. After that the Drop events stop firing. It would be nice to have some way to cancel the Drop in a BeforeDropRecords event. Here's what I have so far: uploads/2676/IconViewDragDrop.zip |
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi Jason,
Moving records isn't what I ment, moving Rows is what I basicly need
Your demo does that but only one time hehehe, I will look at it later on.
Thanks a lot
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
uploads/2676/IconViewDragDrop2.zip
Seems we needed .SortedDragDrop = True. I've cleaned up the code a bit, but there are no comments so if you have any questions just get back to me. It seems to be working okay, I haven't tested it too much though, so if there are any bugs, get back to me of course! |
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
Crap, think I screwed it up - working on a fix and I'll get back to you shortly.
|
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
Sorry Aaron, I came down with a sudden fever yesterday, but I'm better today.
So far, I can get D&D to work twice now, but the bad news is that the more I fight with this, the more I think that it makes more sense to use the Tag property to store any "outside" information (such as DatabaseRecordID). You can even create a class to track multiple pieces of external information and then store instances of the class in each Tag property of each ReportRecord. Maybe there could be a CJ implemented option to only move rows, and not affect the order of the records, but I'll leave that up to you and Andre to discuss. Sorry I couldn't be more help. |
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
As a side note - Andre, it would be nice if Drag&Drop in IconView showed an insertion point like it does in Report view. Any chance of this being added?
|
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi Jason,
I looked up the word discuss:
SYNONYMS discuss, argue, debate, dispute, contend. These verbs mean to talk with others in an effort to reach agreement, to ascertain truth, or to convince. Discuss involves close examination of a subject with interchange of opinions
What is there to discuss if you are the only one who is replying? We can discuss all we want but for what??? if no one from support joins this discussion?
Andre, is this implementation possible in VERY near future?
Please let us know what you think of this
Thanks
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Andre,
What do I have to do to get your attention? (Don't say I have to use IssueTracker because it has been almost 5 days now without even a reply...)
Is it that hard? I just need an answer so I can move on!!!
Thanks
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |