Author Topic: Resizing a GUI Object depending on the size of a text  (Read 457 times)

I have this thing where I do infoNotice("Hello world"); and it should display a box with 'Hello world' in it. But it should have a background object that should resize according to the text, how would I do that? Like
+-----------+
| Hello world |
+-----------+
and
+---------------------------------+
| This automatically resizes the box |
+---------------------------------+
« Last Edit: August 27, 2010, 06:24:40 AM by Bauklotz »

If you want it to send with RTB's GUI stuff, it can't resize. But if you have them download it, you might be able to document text sizes with a default one and have it estimate a full size. Since characters has inconsistent lengths and all.

When the text object resizes, then resize the parent. Check the infotip stuff in RTB for how it's done there.

Check the infotip stuff in RTB for how it's done there.

Wow, I ponder that before, never checked the code and forgot about that.

The problem is that mostly adjusts to generic sizes, like how many lines and all. He wants it more specific to the lettering within.


GuiTextCtrl's only resize height automatically, not width.