Is there any way to get the size of a component before layout is applied (e.g. as in a client) in scripting?
I have a fly-in panel using
system.gui.transform however at the moment I have to hardcode the x coordinates to move it to to move in in and out of the (right side of the) page. I’m using designer coordinates, as I can’t use runtime with right-side fly-ins due to the layout system (left side works ok).
To make it dynamic code instead, I want to get the width of the component and the width of the container its in, and use that instead. However these need to use designer widths, not client/layout-applied widths… Can I get this?
if event.propertyName == 'ShowConfig': objWidth = event.source.width ## this is the layout-applied width, need to replace with the designer width cntWidth = event.source.parent.width ## this is the layout-applied width, need to replace with the designer width newX = cntWidth #### Doesn't work as not designer-width newX = 1361 # if we want to show it, move it into the screen from the right if event.newValue: newX -= objWidth #### newX = 921 event.source.visible = 1 else: event.source.visible = 1 system.gui.transform(event.source ,newX = newX ,duration=75 ,acceleration=4 ,coordSpace=system.gui.COORD_DESIGNER)