GroupBox width needs to fit to 100% in parent

Hopefully this is a simple one. I cannot get group boxes to scale to 100% in a parent container. Here’s my sample markup and the result:

<vbox id="stepLayout" spacing="true">
    <groupBox width="100%" caption="Hello I'm a caption from a database"/>
    <groupBox width="100%" caption="This is a longer caption from a database but I want both groups boxes to auto size to the same width"/>
</vbox>

I require both group boxes to fill to the same 100% width within the parent vbox. Note that the actual captions are generated from code so I have no idea at design time what the actual widths will be.

Am I missing something simple?

Hi,

I applied your markup to a test screen and it works as expected:

Possibly your stepLayout is nested into another container. Also, you can try our Analyze layout action to detect layout mistakes. Right-click on the screen caption (tab) > Analyze layout

Yeah marked your reply as the solution. It was nested in another container with undefined width.

Thank you.