Container Width = 100%

I’ve finally found time to tinker with the Vision Module and I had a question regarding sizing components, specifically the Container component …

I’ve got a Window docked on the north that acts as a header, similar to the one on the IA web site. I’d like to add a gradient along the bottom of the Window … again, similar to the use of headerbg.gif on the IA web site’s header.

I’ve found that I can use the Texture property of the Container component to tile my gradient image. If I size my Container to the height of my image, I’m able to partially achieve my goal … I can adjust the width to whatever I wish and have the image repeat indefinitely.

My problem lies in the width … Is there an approach to adjusting a Container’s width at run-time? I’d like to set the Container’s width to the width of the client window. Can I implement this within script or is there a simpler method I’m overlooking?

Thanks in advance!

There is indeed a simpler method - the feature you’re looking for is called Component Layout. In this case you probably want to simply anchor the container’s west and east edge.

Ah, great! I did just that and it’s working as expected … I literally just got done messing with anchoring components when I created my header Window too!

Thanks!