How to expand or collapse a SplitPanel programmatically?

Hi,

How to expand or collapse a SplitPanel programmatically?

Thanks.

Hi!

Did you try setSplitPosition() ?

Hi Roman,

I can use setSplitPostion(0) to collapse the panel, but when dockable is on, click the dock button can’t make it expand again. Only click on the splitter line works. Consider this should be an issue with dock button widget.

Hi, Anjingjing

When you click dock button it should be moved to the last known position. As you set setSplitPostion(0) it means that last position is 0 and splitter is not moved.

I have created an issue to improve API of SplitPanel: cuba-platform/cuba#2204

Hi Roman,

Is there a workaround for this issue?

Unfortunately, for now, the only way to change the position of splitter is setPosition() method.

Hi Roman,

Thanks.

Looking forward the new api .

Regards,
Ray.