You need to create a custom tab component that has a visual indicator of
the region. Then override isDragAndDropOperation(x, y) to return true if a
click is within that region.
--
You received this message because you are subscribed to the Google Groups
"CodenameOne Discussions" group.
To
Thanks.
How does one programmatically set the drag region for a component?
Regards.
On Sunday, May 12, 2019 at 10:50:52 PM UTC-4, Shai Almog wrote:
>
> No.
> Drag region is the area within a component that can be "draggable" that
> means that if you grab a tab in outside that region it will
Thanks.
I prefer setting the drag region If I understand this.
Would we set a region like the (LEFT Tabs Orientation, Swiping and
scrolling would be top to bottom)) left 1/2 of the Tab component would
scroll and the right half would be DND?
How would I accomplish setting drag region? I don't
We just call that scrolling ;-)
There are several solutions for this, one of them is to define a drag
region within the component which means only a specific region is
swipeable. The other is to have an edit mode, e.g. you can set the
draggable to true only when that edit mode is enabled.
--
Sorry, I was referring to scrolling and I called my finger action from top
to bottom as a swipe. Not sure how else to refer to this action.
I set here: SubSystemTabs.setSwipeActivated(false);
Is there something else I can do to reduce the sensitivity of DND when I
want to scroll the
Why do you have swipe activated for vertical tabs?
Doesn't it make more sense to disable swiping?
--
You received this message because you are subscribed to the Google Groups
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
One suggestion as I suspect this was unintended.
When dragging form low index to higher index the dropped index was (dest
-1) and for me should be dest idx.
if(destIndex > i) {
t.insertTab(title, null, source, destIndex - 1);
} else
Thanks so much.
That worked perfectly
Regards
On Monday, May 6, 2019 at 11:08:42 PM UTC-4, Shai Almog wrote:
> I thought this would make an interesting blog post so I wrote a full
> working sample. My initial mock had a mistake in listener registration:
>
> Form hi = new Form("Tabs", new
I thought this would make an interesting blog post so I wrote a full
working sample. My initial mock had a mistake in listener registration:
Form hi = new Form("Tabs", new BorderLayout());
Tabs t = new Tabs();
t.addTab("T1", new Label("Tab 1"));
t.addTab("T2", new Label("Tab 2"));
Thanks, have been workint this and have the following:
tabsC.addDropListener(e -> {
/// you need to fill this up
I get The Source (e.getDraggedComponent()) and can learn the tabsC
index.
however I can not learn the target index needed to get the underlying
component
Didn't have time to try/run this but something like this might work. You'd
need to remove and re-add the tab in the right location within the drop
listener so the swipe/animation will work.
It relied a bit on the internal structure of the tabs component hierarchy
but not too much:
Form hi =
11 matches
Mail list logo