wxPython TreeCtrl - Dragging multiple items - drag-and-drop

Dragging multiple items in wx.TreeCtrl does not seem to work. I'm trying to use this example https://wiki.wxpython.org/DragAndDropWithFolderMovingAndRearranging with the tree set to wx.TR_MULTIPLE. Even if multiple items are selected, only one gets dragged.
In the TODO list at the top, it says
add support for multiple selection / moving multiple items (should be easy)
What would be the best way to implement this so that it works for multiple items exactly the same way as for a single item?

Related

Dragging multiple items with use-gesture

https://codesandbox.io/s/react-use-gesture-simple-vfrw4
https://use-gesture.netlify.app/docs/gestures/
Read the documentations and there doesn't seem to be any way to select two items and drag them at the same time. I tried with React-DND and after trying it didn't work because the hook didn't allow you to select more than one item when dragging even if you had several elements selected. It seems like it's the same thing with use-gesture.

How to implement backpack UI in Unity

I want to make a backpack UI that can dynamically add and delete items like a menu, but every item in it is a picture (not a text)
I found many tutorials but all of them are panels with slots that need I to set their positions previously. I wonder if there is a better way to make it more easily.
I think the best way is to use a Vertical Layout Group:
https://docs.unity3d.com/Packages/com.unity.ugui#1.0/manual/script-VerticalLayoutGroup.html
Obviously for adding and deleting in player, you have to create buttons with relative scripts.

How to create a virtualized, reorderable list with dynamic sizes, and animated item adding and removal in Flutter?

I need a flutter list package with the following features:
Only renders items in/near visible range (virtualized)
Supports different item heights.
Reorderable through drag and drop
When an item is dragged to the edge of the screen, the list scrolls
When items enter or exit, the list animates nicely
The package ReorderableListView.builder (https://api.flutter.dev/flutter/material/ReorderableListView/ReorderableListView.builder.html) supports 1,3 and 4. No support for 5. Reordering animation was bad for items with differing heights (2) when I tried it out.
The package implicitly_animated_reorderable_list
(https://pub.dev/packages/implicitly_animated_reorderable_list/changelog) supports 3 and 5. Nothing mentioned about 1 or 2 in its readme, and a comment from January here (Flutter: Reorderable AND Animated ListView - any idea?) suggests 4 is missing.
Looking for advice on how to achieve this:
An amazing package that can do all 5.
A way to add features of these different packages together somehow. Is that at all possible?
Advice on forking or not forking and just starting from scratch.
In regards to forking what in your opinion is the most/least trivial of these features to build from scratch?
I'm new to Flutter, so anything I don't know enough to ask about in relation to this subject is also greatly appreciated.
Own answer:
There really isn't a need for any plugins or forks. ReorderableListview.builder can be used to accomplish all 5.
Not sure how I botched the code that made me think ReorderableListView.builder wasn't handling different heights of items correctly, but whatever the glitch was (maybe related to keys?), I'm not able to reproduce it. Interesting that all the docs/tutorials I found only show statically sized list items when dynamically sized list items are no problem.
As for the animated exits and entrances (i.e. not letting the list items seem to jump up and down in a disorienting way), this is really trivial to do by animating height with AnimatedContainer. The existence of a separate AnimatedList widget and ImplicitlyAnimatedList plugin threw me off a bit.

How to implement a 'dynamic' drag and drop (like iOS/Android)?

I would like to implement a 'dynamic' drag and drop in a list. By 'dynamic' I mean that in the list in which the drag is happening, there's an empty space below the dragged element which 'follows it' as you drag through the list (to make it visually obvious where the dropped element will end up in the list). Like what you see in iOS/Android apps supporting D&D.
What I've tried is to use Component.dragEnter to insert an empty Component with the size of the dragged element below the dragged compoment. And as the drag moves through the list, remove the old Component and insert a new one in the new position (explanation of why I create a new Component in next paragraph). However, with the dynamic updates that CN1 does while dragging, and my own updates when moving the empty Component, I just cannot find a way to make it work so I get the right vusual behavior. One aspect making this more complex than you'd think at first is that CN1's built-in support for drag&drop makes the original dragged component invisible with setVisible(false) which means it leaves an empty space behind.
The reason I recreate a new empty Component is because the final drop() will happen on the empty Component, and my trick to make this work is to override drop() on the empty Component to call drop on the dropTarget that is (was) in the Component's position.
All in all, I've spend I don't know how many days trying to get this to work with no success so far. Let me know if anyone has a suggestion for a more straightforward approach?
Big thanks in advance!
The builtin support hides the original component but drags an image of it which you can customize by overriding getDragImage().
You can use custom code to highlight the drop location by using a drag over listener which you can accomplish by using addDragOverListener(ActionListener).

Can you turn subsets of slides into a custom component in Ionic 3+?

I have tried to create custom components which are subsets of slides. I'm trying to create a custom Ionic component which is a subset of slides. Then I can mix and match subsets of slides in one to make a complete slide show. Like building a master process from sub-processes. You should be able to swipe back and forth between all slides as expected, no matter an directly in the component, or slides within custom components.
I've tried various methods to no avail. Any ideas?
PLEASE SEE THIS SAMPLE PROJECT WITH 2 METHODS I HAVE TRIED TO ACCOMPLISH THIS.
No. You can't do this. You can put a into another if one scrolls vertically and one horizontally. You can insert a custom component into an which just has a couple slides in it, put the inserted slides show one over the other vertically with no way to swipe back and forth. So, no. You can't do this. Perhaps with dynamic templates you can build the from code dynamically. That's the only work around I can see.