Initial (re)size of container control upon window open

I have a defined container control of an arbitrary size, say 100 x 100. I place that container control in a much larger window and stretch the control’s borders to near the edges of the window and then lock all four sides to be relative to the window size.

If I resize the window manually by dragging the corner, then the container control properly resizes to the appropriate locked location. However when the window first opens, the container control is of the size it is defined, not stretched to the size I’ve pulled its edges to in the containing window.

I’ve tried invalidating the container, and the window to no avail. I have also tried changing the window size programmatically (width = width + 1 ). I have also tried explicitly changing the size of the container control in the window open method.

Any suggestions?

(Deleted by author)

I can’t reproduce the effect described in an example project: Container_Locking.xojo_xml_project

Can you provide us an example project showing the issue?

Thanks Tim. Your small, simple example was enough to convince me that the problem was with my code, not with Xojo. Turned out to be a self-inflicted, truly obscure scaling problem.