Hi,
I got some trouble by positioning children of my EditPanel class (a simple Widget), the children elements are positioned in an absolute way (relative to root pane, the window...).
This problem seems to occur with all children of this panel, i have a Label and a TabbedPanel in it, I will keep only the Label for demos.
So, i'm doing:
Code:
public class EditPanel extends Widget {
private final Label cellInfosLabel;
public EditPanel() {
super();
setTheme("panel");
cellInfosLabel = new Label("No selection");
add(cellInfosLabel);
}
@Override
protected void layout() {
super.layout();
setInnerSize(250, 627);// 640 - 10 - 3 ??
cellInfosLabel.setSize(getInnerWidth(), getInnerHeight());
cellInfosLabel.setPosition(30, -220);
}
}
I'm using the layout() method to resize element and to set its position...
Which is stupid I already had this issue with my map grid but i'm unable to remember how i resolved it.
Thank you in advance for your help.
EDIT: I made a mistake, The TabbedPane is positioned in an absolute way but for the Label, it's more complex, X is absolute but Y is relative to an illogic point (the middle ? not quite)
I added the screen of the Label and the Tabbedpane, you could see there is another issue with the Tabbox of the TabbedPane...
I think i'm doing something wrong...