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: 1207
Joined: Sat Sep 10, 2011 4:07 am
Location: India

Re: Drag grid item to another grid

Post 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
BPD
Convert Dream into Reality through HMG
User avatar
mol
Posts: 3718
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: Drag grid item to another grid

Post 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...
edk
Posts: 909
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland

Re: Drag grid item to another grid

Post 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 219 times
Drag tree and textbox.gif
Drag tree and textbox.gif (53.13 KiB) Viewed 9155 times
User avatar
serge_girard
Posts: 3161
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: Drag grid item to another grid

Post by serge_girard »

Great Work !

Thank again Edward,

Serge
There's nothing you can do that can't be done...
edk
Posts: 909
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland

Re: Drag grid item to another grid

Post 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: ?
User avatar
luisvasquezcl
Posts: 1258
Joined: Thu Jul 31, 2008 3:23 am
Location: Chile
Contact:

Re: Drag grid item to another grid

Post by luisvasquezcl »

serge, great job. thanks for release.
best regards
User avatar
bpd2000
Posts: 1207
Joined: Sat Sep 10, 2011 4:07 am
Location: India

Re: Drag grid item to another grid

Post by bpd2000 »

Thank you Edward
BPD
Convert Dream into Reality through HMG
User avatar
mol
Posts: 3718
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: Drag grid item to another grid

Post by mol »

Thanks!
I've made myself waiting for response :-)
It's great work you have done, Edward!
edk
Posts: 909
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland

Re: Drag grid item to another grid

Post 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 9096 times
DragAndDrop_0.006.zip
(18.31 KiB) Downloaded 220 times
Enjoy.
EduardoLuis
Posts: 682
Joined: Tue Jun 04, 2013 6:33 pm
Location: Argentina

Re: Drag grid item to another grid

Post by EduardoLuis »

Hey Edward what a great job. Excelente. Congratulations
Post Reply