You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I know why this is happening, it is a side effect of non-moveable panels. The problem is that non-moveable panels can also NOT be a drop target for other panels (the very act of docking a panel into another, moves both panels). Whenever your layout does not contain any valid drop targets, or moveable panels, a placeholder panel is introduced and automatically added to the layout (hence the empty gap you are seeing).
The placeholder is necessary because without it, you essentially lose all ability to edit your layout (you can no longer attach any new or existing panels because there are no valid drop targets). I know that is what you were intending in this case, but without the placeholder, you would also be permanently locked out of editing your layout if you happen to close all existing panels through the interface. You may get a better understanding if you were to add your non-moveable panel using DOCK.RIGHT, as it would then be docked to the right side of the empty space instead.
This is not an easy problem to solve, the placeholder exists solely to prevent a situation where your user is permanently locked out from using the interface at all. However, it seems that this is exactly what you intend to do, so in this case I will illustrate a simple hack you can do to force the effect you want:
By adding a timeout within the creation callback of the panel, and only assigning it as non-moveable after the creation has already happened, you essentially fool the interface into thinking it doesn't need the placeholder. The placeholder is only added when there are no valid drop targets during an add, remove, or move panel event, since you added a moveable panel to the interface, it does not need the placeholder. Changing the moveable attribute after it has already been added, and assuming you do not later add or adjust more panels, does not cause it to reassess whether it needs the placeholder again.
Hello Jeff,
Scenario:
Steps:
moveable = true
moveable= false
Do I miss something?
Sample:
wcDocker.zip
Thank you.
Best,
Alexander
The text was updated successfully, but these errors were encountered: