Problems with Auto Sizing

Special forum to share and discuss skins for Pano2VR and Object2VR
Post Reply
hromain
Posts: 42
Joined: Wed Apr 11, 2018 12:12 pm

I have a text box that, using a logic block, displays different text based on the node. Attached to the text box is a rectangle button that expands and collapses the text box on mouse click (see Fig 1). This button is a child of the text box and has a right center anchor point with a 0 Y position coordinate.

However, the length of the text varies in each scene. When I specify a fixed size percentage for the text box without selecting auto-size, it leaves a lot of blank space at the bottom of the shorter texts (see Fig 2).

When I make the text box auto-size, the blank lines are gone, but the collapse/expand button is no longer centered (see Fig 3). Also, this causes some of the longest texts to extend beyond the maximum height I want.

I'm wondering if a) there's a way to control the button's position so that it's placed AFTER the autosize occurs (thus keeping it vertically centered) and b) if limits can be placed on autosizing (ie, autosize up to 25% Y size, then use scrollbar).

Any other solutions are also appreciated. Thanks
Attachments
Fig. 3.png
Fig. 3.png (340.59 KiB) Viewed 3280 times
Fig. 2.png
Fig. 2.png (885.36 KiB) Viewed 3280 times
Fig. 1.png
Fig. 1.png (564.19 KiB) Viewed 3280 times
User avatar
Hopki
Gnome
Posts: 13005
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi,
My first thoughts on this is why not just anchor the button top right of the text box, then it can auto size as much as it wants.
Another thought is because as you say change text depending on node, then you can use Node ID or Tags to then swop out the text box with one with scroll bars.
Knowing you can do this you can even change the size of the button depending on Node ID.Tag.
Regards,
Hopki
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
Post Reply