Blockland Forums > Modification Help
Resizing a GUI Object depending on the size of a text
(1/1)
Bauklotz:
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 |
+---------------------------------+
MegaScientifical:
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.
M:
When the text object resizes, then resize the parent. Check the infotip stuff in RTB for how it's done there.
MegaScientifical:

--- Quote from: M on August 27, 2010, 12:39:21 PM ---Check the infotip stuff in RTB for how it's done there.

--- End quote ---

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.
Bauklotz:

--- Quote from: M on August 27, 2010, 12:39:21 PM ---
--- End quote ---

GuiTextCtrl's only resize height automatically, not width.
Navigation
Message Index

Go to full version