Repaint dialog inconsistent

31 views
Skip to first unread message

Jérémy MARQUER

unread,
Dec 21, 2016, 5:58:27 AM12/21/16
to CodenameOne Discussions
Hi there,

I'm facing to a repaint issue.

I've Dialog with some components. I've one container which contain draggable components and an other one in which I can drop these ones.

When I'm dropping a component (label) in the drop target container, dialog background style change to transparent (less a second). 
I think it occurs during repaint of the dialog. For information, I don't have style the dialog component.

Thanks,

Jérémy.

Shai Almog

unread,
Dec 22, 2016, 2:54:15 AM12/22/16
to CodenameOne Discussions
Hi,
are you dragging outside of the dialog or within?
A dialog is a separate form so the form you see behind you is just a screenshot and you can't drag there.

If you want to drag from a dialog you need to use InteractionDialog.

Jérémy MARQUER

unread,
Dec 22, 2016, 3:08:35 AM12/22/16
to CodenameOne Discussions
Hi,

I'm dragging in a container which is inside the dialog .... Drag & drop work well inside my dialog. Problem is the repaint that occur at the time of the drop.

Shai Almog

unread,
Dec 23, 2016, 12:38:57 AM12/23/16
to CodenameOne Discussions
Hi,
I would not do that sort of thing in a dialog as dialogs are pretty complex internally. Do you have a screenshot?

Jérémy MARQUER

unread,
Jan 18, 2017, 5:00:02 AM1/18/17
to CodenameOne Discussions
Hi,

I can't take screenshot since it occurs during less a second ! I will take a video...

For informations : problem is dialog content pane become transparent when the drop occurs.

Jérémy MARQUER

unread,
Jan 18, 2017, 5:24:24 AM1/18/17
to CodenameOne Discussions
You can reproduce the problem with this (project with business theme) : 

Dialog hi = new Dialog("Welcome");
Label lblDraggable = new Label("DRAGGABLE");
lblDraggable.setDraggable(true);

Container cntSrc = new Container();
cntSrc.setDropTarget(true);
cntSrc.setUIID("ComboBox");
cntSrc.add(lblDraggable);
cntSrc.setPreferredH(200);
Container cntTarget1 = new Container();
cntTarget1.setDropTarget(true);
cntTarget1.setUIID("ComboBox");
cntTarget1.add(new Label("A label"));

Component.setSameHeight(cntSrc, cntTarget1);
hi.addComponent(BoxLayout.encloseY(cntSrc, cntTarget1));
hi.getContentPane().setPreferredSize(new Dimension(800, 600));
hi.show();


Shai Almog

unread,
Jan 18, 2017, 11:46:53 PM1/18/17
to CodenameOne Discussions
We're pretty flooded with issues and I don't even have someone to assign for this.
You should file an issue with the test case but right now 3.7 is already full and things get scheduled for 3.8.
Reply all
Reply to author
Forward
0 new messages