WebContainer width wrong

I have a web container sub classed and set in a web page by the designer (not code)

The container does not report its correct width until the window has been resized.

My workaround is to put an invisible control on the right edge and lock it’s position.

I added a getWidth() function which returns the control’s left and width.

This works, but it seems very strange to need it.

This is 2025r3.
I can’t find an issue just like this, but am wondering if anyone else has experienced it.

I only noticed because the container adds more containers within it and determines how many columns based on it’s width.

Create an Issue and add a sample project.

I think I read something like this but not sure if it was a reported issue.

@Chris_Halford you know that the flex layout option does that for you, right? The column management stuff.

No, I’m not aware of what you are referring to.

The flex layout option lets other containers flow into the space, either left to right or top to bottom. It’s a mechanism for holding items when you don’t know how many there might be. It should be available in the container’s inspector when placed on the page.

You can refer to the example project in this post (by me) for using the Flex layout.

3 Likes

Thanks to both of you.

1 Like