Drag grid item to another grid

Utilities like DBU, Make, IDE written in HMG/ used to create HMG based applications

Moderator: Rathinagiri

User avatar
bpd2000
Posts: 1048
Joined: Sat Sep 10, 2011 4:07 am
Location: India
Has thanked: 182 times
Been thanked: 85 times

Re: Drag grid item to another grid

Post by bpd2000 » Mon Jan 07, 2019 4:18 am

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
BPD
Convert Dream into Reality through HMG

User avatar
mol
Posts: 3139
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 194 times
Been thanked: 107 times
Contact:

Post by mol » Thu Jan 10, 2019 9:59 am

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...

edk
Posts: 420
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland
Has thanked: 125 times
Been thanked: 331 times

Post by edk » Thu Jan 10, 2019 7:39 pm

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 28 times
Drag tree and textbox.gif
Drag tree and textbox.gif (53.13 KiB) Viewed 243 times

User avatar
serge_girard
Posts: 2224
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Has thanked: 500 times
Been thanked: 110 times
Contact:

Post by serge_girard » Thu Jan 10, 2019 9:02 pm

Great Work !

Thank again Edward,

Serge

edk
Posts: 420
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland
Has thanked: 125 times
Been thanked: 331 times

Post by edk » Thu Jan 10, 2019 10:45 pm

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: ?

User avatar
luisvasquezcl
Posts: 1127
Joined: Thu Jul 31, 2008 3:23 am
Location: Chile
Has thanked: 13 times
Been thanked: 14 times
Contact:

Post by luisvasquezcl » Fri Jan 11, 2019 1:50 am

serge, great job. thanks for release.
best regards

User avatar
bpd2000
Posts: 1048
Joined: Sat Sep 10, 2011 4:07 am
Location: India
Has thanked: 182 times
Been thanked: 85 times

Post by bpd2000 » Fri Jan 11, 2019 4:55 am

Thank you Edward
BPD
Convert Dream into Reality through HMG

User avatar
mol
Posts: 3139
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 194 times
Been thanked: 107 times
Contact:

Post by mol » Fri Jan 11, 2019 6:37 am

Thanks!
I've made myself waiting for response :-)
It's great work you have done, Edward!

edk
Posts: 420
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland
Has thanked: 125 times
Been thanked: 331 times

Post by edk » Fri Jan 11, 2019 1:50 pm

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 183 times
DragAndDrop_0.006.zip
(18.31 KiB) Downloaded 28 times
Enjoy.

EduardoLuis
Posts: 625
Joined: Tue Jun 04, 2013 6:33 pm
Location: Argentina
Has thanked: 1 time
Been thanked: 42 times

Post by EduardoLuis » Fri Jan 11, 2019 4:26 pm

Hey Edward what a great job. Excelente. Congratulations

Post Reply