TreeGadget: MoveGadgetItem()
Posted: Thu Feb 14, 2019 3:27 pm
Hello,
TreeGadget is a good gadget and works fine, but is not easy to manage. Adding and deleting elements is easy, but moving them is not, especially if the Item contains sub-branches. I think it would be interesting to add a new function related to move items.
There are many examples on the forum, but I think it would be good for the professional side of PB to add a native feature.
A function can be like this:
MoveGadgetItem()
Result = MoveGadgetItem(#Gadget, Position_From, Position_To [,Flags])
Flags (optional)
#PB_Tree_After : Item will be moved AFTER Position_To (default)
#PB_Tree_Above : Item will be moved ABOVE Position_To
#PB_Tree_SubTree : All sub tree will be move also (default)
All defined properties should follow (ItemData(), Color, State (expand/collapse), Icon, CheckBox status)
How about that ?
TreeGadget is a good gadget and works fine, but is not easy to manage. Adding and deleting elements is easy, but moving them is not, especially if the Item contains sub-branches. I think it would be interesting to add a new function related to move items.
There are many examples on the forum, but I think it would be good for the professional side of PB to add a native feature.
A function can be like this:
MoveGadgetItem()
Result = MoveGadgetItem(#Gadget, Position_From, Position_To [,Flags])
Flags (optional)
#PB_Tree_After : Item will be moved AFTER Position_To (default)
#PB_Tree_Above : Item will be moved ABOVE Position_To
#PB_Tree_SubTree : All sub tree will be move also (default)
All defined properties should follow (ItemData(), Color, State (expand/collapse), Icon, CheckBox status)
How about that ?