My application’s got one horizontal SashForm with two children. The leftmost one should always be, at least, 200 pixels width. So I added a ControlListener to the left component. In its controlResized event I check the component’s width. When it’s smaller than 200, I set its bounds’ width to 200. It apparently works as the component gets resized to that width, but the sashform stops working – the sash is no longer visible, it remains under the component.
Does anybody know what am I missing?
I’ve tried:
component.addControlListener(new ControlAdapter() {
@Override
public void controlResized(ControlEvent e) {
if (component.getBounds().width < 200) {
Rectangle bounds = component.getBounds();
bounds.width = 200;
component.setBounds(bounds);
}
}
});
here is an example