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
Hi all,
I would like to know how to set initial size on a Gridview panel.
I tried doing so by invoking panel.api.setSize({ width, height}) in the same onReady function after adding the panels, but that workaround didn't really work.
There's no initial SizeEvent to set and setting the size for the component options doesn't do anything.
help would be appreciated :D
Here's an example:
exportdefaultfunctionModelPanel(){functionmount(event: GridviewReadyEvent){const{ api }=eventconstribbonPanel=api.addPanel({id: crypto.randomUUID(),component: 'ribbon',params: {title: 'Model Ribbon'},minimumHeight: 30,maximumHeight: 60,// one option would be to restrict both min and max to one value, but that's not optional// size: {width: number, height: number} <- something like this doesn't exist, but would be cool (SizeEvent)})constscenePanel=api.addPanel({id: crypto.randomUUID(),component: 'scene',params: {title: 'Model Scene'},position: {referencePanel: ribbonPanel.id,direction: 'below'},})// ribbonPanel.api.setSize({ ... }) <- this does not work}return(<GridviewReactorientation={Orientation.HORIZONTAL}components={modelPanelComponents}onReady={mount}/>)
I also tried using the onDidAddPanel event, but that also didn't work
api.onDidAddPanel((panel)=>{// some panel filtering here ...panel.api.setSize({height: 30})})
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
I would like to know how to set initial size on a
Gridviewpanel.I tried doing so by invoking
panel.api.setSize({ width, height})in the same onReady function after adding the panels, but that workaround didn't really work.There's no initial
SizeEventto set and setting thesizefor the component options doesn't do anything.help would be appreciated :D
Here's an example:
I also tried using the
onDidAddPanelevent, but that also didn't workBeta Was this translation helpful? Give feedback.
All reactions