Customizing component layouts
from com.inductiveautomation.factorypmi.application.components.util import FPMILayout
layout = component.getClientProperty(FPMILayout.LAYOUT_CONSTRAINTS)
layout.setFlags(FPMILayout.ANCHOR_N | FPMILayout.ANCHOR_E | FPMILayout.ANCHOR_W | FPMILayout.ANCHOR_S)
#Here is how to get the designer bounds from the client. Works for any container. Maybe it works for components. Does not work for windows so use the rootContainer.
r = FPMILayout.getPreferredBounds(system.gui.getParentWindow(event).rootContainer)
width, height = int(r.width), int(r.height)