Setting Split Pane properties globally

I am looking for a way to set Split Pane properties globally (at application startup), like for example setting divSize = 3 or resizeWeight = 0.4 etc. Does such a possibility exist in NGTi?

Thanks for a hint and regards,

Hi Robert,

I don’t think this can be done globally.
You might be able to override the defaults using css, but this doesn’t work well if dimensions are calculated dynamically within the component.

Otherwise you can create a function that sets all these defaults.
In order to achieve that you should pass the element as a parameter, something like this:

function setSplitPaneDefaults(_splitpane) {
    _splitpane.setDividerSize(3);
    _splitpane.setResizeweight(0.4);
}

Then onLoad/onShow of the form, you only have to call the function like

    scopes.ui_defaults. setSplitPaneDefaults(elements.mySplitpane)

Hope this helps

Hi Marc

Thanks for your opinion, and for your example – good to see your idea.

I looked for something like the possibilities with the grid options (plugins.ngDataGrid.gridOptions ≠ …) but did not find anything. So it’s just good to be sure not to have missed an elegant solution.

Best regards and have a nice holiday season

I assumed you were looking for something like that.

I’m afraid it doesn’t get more elegant than the solution I provided ;-)