Set minimized location

Hello,
I have now a CGrid grid = new CGrid(control); And I add SingleCDockable as in grid.add(x, y, w, h, dockable);. How can I set that a SingleCDockable should have the initial minimized position for example in the west? Because as for now all Docks in my app have the initial minimized position to the north.

Furthermore, how can I add later new SingleCDockable to the CGrid? I think I need to use control.getContentArea().getCenterArea() but I’m not quite sure how.

Hello,
I think I have figured that out my myself:

To set the default minimized position:


DefaultSingleCDockable dockable = ...
CFlapIndexLocation location = CLocation.base().minimalSouth()
dockable.setDefaultLocation(ExtendedMode.MINIMIZED, location);

To add a new CDockable:


DefaultSingleCDockable dockable = createSingleDock(dock);
CGridArea center = control.getContentArea().getCenterArea();
dockable.setLocation(CLocation.normalized(center).rectangle(x, y, w, h));
control.addDockable(dockable);
dockable.setVisible(true);

I would have said the same thing.

One feature that may be interesting for you: the method “CDockable.setLocationAsideFocused()” automatically sets the location of a Dockable to be close to the Dockable that currently has the focus.