Widget auto resize?

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

Mars_999
Not too shy to talk
Not too shy to talk
Posts: 30
Joined: Sun Sep 11, 2011 18:18

Widget auto resize?

Postby Mars_999 » Tue Sep 13, 2011 00:37

Hello I am new to CEGUI, and don't see in the Window class anything that allows me to specify the widget to resize itself... e.g. I have a button and the text is larger than the button. How can I have the button resize itself to hold the text?

Thanks!

BTW are there any really good sites with CEGUI tutorials? I see we have a wiki but looking for more examples... Or a complete setup of a menu system to learn from...

Jamarr
CEGUI MVP
CEGUI MVP
Posts: 812
Joined: Tue Jun 03, 2008 23:59
Location: USA

Re: Widget auto resize?

Postby Jamarr » Wed Sep 14, 2011 20:37

To my knowledge there is no mechanism as of yet for windows to resize themselves based on text / size changes of child windows. If it were, it would likely be handled by Layout Containers; I believe Kulik was going to add support for this in v0.8.

That being the case, you can manually resize the window after setting it's text by querying for the text-dimensions and resizing the parent accordingly. A search through the forums, wiki, and api docs should produce information on how to accomplish this.
If somebody helps you by replying to your thread, upvote him/her as a thanks! Make sure to include your CEGUI.log and everything you tried when posting! And remember that we are not magicians!


Return to “Help”

Who is online

Users browsing this forum: No registered users and 29 guests