PDA

View Full Version : BorderLayoutData and setCollapsible()



ktlili
12 Nov 2009, 5:39 AM
Hi,

The class BorderLayoutData has the method setCollapsible(boolean b).

Is it possible to collapse programatically the target area?



...
borderLayoutData.setCollapsed(true);
...If not, is-it possible to specify if the area is collapsed on initialisation. ?

Regards.
KT

micgala
13 Nov 2009, 12:54 AM
Hi,

The class BorderLayoutData has the method setCollapsible(boolean b).

Is it possible to collapse programatically the target area?


Yes, it is possible.

Try this:



yourBorderLayout.collapse(layoutRegionToCollapse);
yourBorderLayout.expand(layoutRegionToExpand);


Regards,
Michel.

ktlili
13 Nov 2009, 1:34 AM
Thanks for the response.

I tried



...
setVisible(false);
DeferredCommand.addCommand(new Command() {
public void execute() {
borderLayout.collapse(Style.LayoutRegion.WEST);
setVisible(true);
}
});
...


and it works well.

Regards.
KT