Page 5 of 7

Re: Drag grid item to another grid

Posted: Mon Jan 07, 2019 4:18 am
by bpd2000
mol wrote: Sun Jan 06, 2019 10:00 am Jesteś wielki!
Król Edward na 3 Króli! :-D

Ps. Jakim programem robisz te animowane gify?
You can also use Open Source Portable Application Screento GIF
https://www.screentogif.com/
https://github.com/NickeManarin/ScreenT ... rtable.zip

Re: Drag grid item to another grid

Posted: Thu Jan 10, 2019 9:59 am
by mol
Hi Edward!
Can you put here small sample how to drag item from tree to textbox? I want to paste treeitem text to textbox and remember Id in another variable...

Re: Drag grid item to another grid

Posted: Thu Jan 10, 2019 7:39 pm
by edk
No problem.
The ability to drag from TextBox to Tree_2 with the right mouse button has also been added.
DragAndDrop_0.005b.zip
(12.16 KiB) Downloaded 220 times
Drag tree and textbox.gif
Drag tree and textbox.gif (53.13 KiB) Viewed 9181 times

Re: Drag grid item to another grid

Posted: Thu Jan 10, 2019 9:02 pm
by serge_girard
Great Work !

Thank again Edward,

Serge

Re: Drag grid item to another grid

Posted: Thu Jan 10, 2019 10:45 pm
by edk
Thanks Serge.
I will soon try to add the possibility of moving the items of the tree so that you can freely set the order of their positions in the nodes. I'm thinking about using drag and drop with the Shift key for this purpose. Also, we will need a new InsertItem method that can be useful for other tasks. I'm still thinking about the possibility of defining a tree from scratch. Or maybe a dynamic context menu for any tree item/node, who knows :mrgreen: ?

Re: Drag grid item to another grid

Posted: Fri Jan 11, 2019 1:50 am
by luisvasquezcl
serge, great job. thanks for release.
best regards

Re: Drag grid item to another grid

Posted: Fri Jan 11, 2019 4:55 am
by bpd2000
Thank you Edward

Re: Drag grid item to another grid

Posted: Fri Jan 11, 2019 6:37 am
by mol
Thanks!
I've made myself waiting for response :-)
It's great work you have done, Edward!

Re: Drag grid item to another grid

Posted: Fri Jan 11, 2019 1:50 pm
by edk
As promised here is the next version.
Added:
- support for Ctrl and Shift while dragging and dropping.
With the Shift key, you can move items by changing the position in the tree, with the Ctrl key we perform a copy operation.
- handling the context menu when dropping the right mouse button on tree # 2 (Copy / Move)
- handling the context menu of tree # 2 (on the tree item/node: Rename / Delete / Add as child ; in the empty tree space: Add New As Root )
- there is a new method for the tree: InsertItem
As I did not integrate this method with HMG sources, we call it as a function: _InsertItem (ControlName, FormName, cValue, nInsertPos, [aImage], [Id]).

Now you can build a tree using the context menu. :)
Tree.gif
Tree.gif (74.51 KiB) Viewed 9122 times
DragAndDrop_0.006.zip
(18.31 KiB) Downloaded 220 times
Enjoy.

Re: Drag grid item to another grid

Posted: Fri Jan 11, 2019 4:26 pm
by EduardoLuis
Hey Edward what a great job. Excelente. Congratulations