Page 1 of 1

Hide panel container by default in designer

Posted: Thu Jun 08, 2023 11:45 pm
by fridaystreet
When the report designer starts the container that has the panels (dictionary, properties, report tree) in it is always open. I can't seem to find a setting that starts the designer with this section minimised.

Is there an setting or a programatical way to close this by default?

Re: Hide panel container by default in designer

Posted: Mon Jun 12, 2023 9:46 pm
by Lech Kulikowski
Hello,

We need some time to check that possibility. We will let you know about the result.

Thank you.

Re: Hide panel container by default in designer

Posted: Tue Jun 13, 2023 8:05 am
by Lech Kulikowski
Hello,

Please check the following code:
var designer = new Stimulsoft.Designer.StiDesigner(designerOptions, "StiDesigner", false);
designer.renderHtml("content");
designer.jsObject.options.propertiesPanel.hideButton.action();

Thank you.

Re: Hide panel container by default in designer

Posted: Mon Jun 19, 2023 11:47 am
by fridaystreet
awesome thanks, that worked, but is there anyway to detect the state or the clicks to open close so I can maintain a reference to it's state in my react component. Possibly even then save that in the users settings on the server so it returns to they way they had it next time.

I've tried overriding the onCLick of the button to see if I could capture the click but this never fires.

designer.jsObject.options.propertiesPanel.hideButton.onClick = e => {
console.log('clicked')
return designer.jsObject.options.propertiesPanel.hideButton.onClick(e)
}

Was thinking maybe monitoring the width and height, seems this property designer.jsObject.options.propertiesPanel.mainPropertiesPanel.clientWidth and .clientHeight are changed.

Re: Hide panel container by default in designer

Posted: Tue Jun 20, 2023 12:02 pm
by Lech Kulikowski
Hello,

Please try to use
instead of OnClick - action() ->
Designer.jsObject.options.propertiesPanel.hideButton.action = function () { }

Thank you.