Hide panel container by default in designer

Stimulsoft Reports.JS discussion
Post Reply
fridaystreet
Posts: 20
Joined: Thu Jun 08, 2023 11:40 pm

Hide panel container by default in designer

Post 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?
Lech Kulikowski
Posts: 6197
Joined: Tue Mar 20, 2018 5:34 am

Re: Hide panel container by default in designer

Post by Lech Kulikowski »

Hello,

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

Thank you.
Lech Kulikowski
Posts: 6197
Joined: Tue Mar 20, 2018 5:34 am

Re: Hide panel container by default in designer

Post 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.
fridaystreet
Posts: 20
Joined: Thu Jun 08, 2023 11:40 pm

Re: Hide panel container by default in designer

Post 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.
Lech Kulikowski
Posts: 6197
Joined: Tue Mar 20, 2018 5:34 am

Re: Hide panel container by default in designer

Post by Lech Kulikowski »

Hello,

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

Thank you.
Post Reply