Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » drag and drop support(tables drag and drop)
drag and drop support [message #1809303] Fri, 12 July 2019 20:50 Go to next message
Missing name Mising name is currently offline Missing name Mising nameFriend
Messages: 3
Registered: September 2014
Junior Member
Hi

Is there some example for a drag and support for rows? I´m trying to reorder rows in a hierarchycal table, and looking at the AbstractTableField looks it does it, but I wasn´t able to drag a row with the mouse (row gets selected, instead of "captured").

If this is not the case, I will create a column with a burger image, in order to move the row as long as the user moves the burger image. Would you guys follow this approach?

By the way, How can I expose to be dragged a IDNDSupport.TYPE_JAVA_TRANSFER?

Thanks in advance
PS: Congrats, as a front dev hater, I love this project.
Re: drag and drop support [message #1809411 is a reply to message #1809303] Mon, 15 July 2019 18:38 Go to previous message
Beat Schwarzentrub is currently offline Beat SchwarzentrubFriend
Messages: 205
Registered: November 2010
Senior Member
Missing name Mising name wrote on Fri, 12 July 2019 16:50
Is there some example for a drag and support for rows? I´m trying to reorder rows in a hierarchycal table, and looking at the AbstractTableField looks it does it, but I wasn´t able to drag a row with the mouse (row gets selected, instead of "captured").


Unfortunately, the drag&drop implementation on tables and trees is currently missing, and will probably stay absent for quite another while... :(

It is not that that easy to implement, especially if both "moving" and "selecting" should be possible at the same time. Moving rows within a hierarchical structure has the potential for even more complicated problems, such as keeping levels or deciding whether a node should be moved "just below" the current node's parent or as last child of that parent.

Quote:
If this is not the case, I will create a column with a burger image, in order to move the row as long as the user moves the burger image. Would you guys follow this approach?


This is certainly possible, but it requires an implementation in JavaScript. If you feel confident, you can give it a try. The Table widget has a nice moveRow() method that could be useful for your purpose.

If you want to keep it simple, I would recommend adding "Move up"/"Move down" menus to the table (like in the column organize dialog on table pages, inside the little "gear" icon menu). The AbstractTable also offers methods to change the row order. This approach might not be the prettiest or most user friendly one, but it is very easy to implement and requires very little code. As a bonus, it also works nicely on touch screens.

index.php/fa/35929/0/

Regards,
Beat
Previous Topic:Image browser widget
Next Topic:Tree SmartField Lookup
Goto Forum:
  


Current Time: Tue Apr 16 21:39:44 GMT 2024

Powered by FUDForum. Page generated in 0.28742 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top