B4J Question Help with scrolling while dragging.

MrKim

Well-Known Member
Licensed User
I have project with a scrollpane with a lot of lists with a lot of controls.
I have drag and drop working OK the problem is sometimes,when dragging the target will be off the screen. When I drag to the edge of the screen I need to begin scrolling. I though about using the underlying pane but it will not always be available because the lists will be covering the edges.bars

Anybody have any ideas on the best way to accomplish this?
Is it possible to make the scrollpane scrollbars part of a drag and drop?

I have included a sample project.

Thanks in advance for any ideas.
 

Attachments

MrKim

Well-Known Member
Licensed User
It doesn't look like it will. I have multiple listviews oriented horizontally but generally you're moving from one list to view to another. The Location you want could be off the screen both horizontally and vertically.
 

stevel05

Expert
Licensed User
Here is one possible solution: add panes as targets at the edges of the view and when an item is dragged over them start a timer to scroll the scrollpane. Stop when the drag exits the panes or is dropped (this is automatic).

The attached implements scroll up only and doesn't resize the pane if the form is resized you can implement that with the rest of the panes if you decide to try it, you are not helping yourself by not using the designer.
 

Attachments

MrKim

Well-Known Member
Licensed User
Here is one possible solution: add panes as targets at the edges of the view and when an item is dragged over them start a timer to scroll the scrollpane. Stop when the drag exits the panes or is dropped (this is automatic).

The attached implements scroll up only and doesn't resize the pane if the form is resized you can implement that with the rest of the panes if you decide to try it, you are not helping yourself by not using the designer.
Yeah. I started that, put them one the layout with the ScrollPane but then they wind up outside the scrollbars which looks and acts kind of hokey. Next I guess I'll try putting them on the ScrollPane.innernode. The problem with that of course is the innernode will frequently be much larger than the form/ScrollPane which means I need to figure out how to place them on the edge on resize, and figure out and allow for the the width of the scrollbar if it is visible. Which makes me wonder, is the scrollbar width fixed or is that settable in windows?
Guess I am going to have to play around with this
 
Last edited:
Top