I have form and I want to have it organised in two columns. First is long and scrollable, and other need to always stays on right side. Second columns need to be small in width, so that it doesn't take too much screen space.
my code look like something like this :
@Order(1000.0)
public class MainBox extends AbstractGroupBox {
@Override
protected TriState getConfiguredScrollable() {
return TriState.FALSE;
}
@Order(1000.0)
public class OfferBox extends SxAbstractGroupBox {
@Override
protected TriState getConfiguredScrollable() {
return TriState.TRUE;
}
@Override
protected int getConfiguredGridColumnCount() {
return 1;
}
@Override
protected int getConfiguredGridX() {
return 0;
}
@Override
protected int getConfiguredGridY() {
return 0;
}
@Override
protected double getConfiguredGridWeightX() {
return 1; // This should stretch this box
}
......
}
@Order(4000.0)
public class ShortCutBox extends AbstractGroupBox {
@Override
protected TriState getConfiguredScrollable() {
return TriState.TRUE;
}
@Override
protected int getConfiguredGridColumnCount() {
return 1;
}
@Override
protected int getConfiguredGridX() {
return 1;
}
@Override
protected int getConfiguredGridY() {
return 0;
}
@Override
protected double getConfiguredGridWeightX() {
return 0; // this defined that box shouldn't stretch
}
@Override
protected int getConfiguredWidthInPixel() {
return 200; // This should give me fix width 200
}
@Order(4100)
public class MyButton1 extends AbstractButton {
}
@Order(4200)
public class MyButton2 extends AbstractButton {
}
....
}
}
But this configurations give a layout like this :
If I set buttons to have
@Override
protected int getConfiguredHorizontalAlignment() {
return 1;
}
it looks right, but problem is that box still right box still extends over left one, so scroll and click on fields doesn't work on right side on the left panel. (inside black rectangle)
What am I missing?