We had a request which we thought we would share as it may help others.
The issue.
When changing nodes a text box with a scroll bar displaying user data description would not reset after a node change.
In some instances, this would be desirable, but in this case, the text box should reset after node change so the text starts from the top.
If you open the attached project and create the output, you will see three text boxes that look the same.
Go to node2.
All text boxes will now have scroll bars, scroll down all three.
Now change to node3.
You will see the first text box, top left, displays the issue, while the other two have reset.
If you open the skin you will see the first text box with the ID: normal_text_box.
This has the user data description placeholder $(ud).
In the text box properties it has, Word Wrap and Scroll Bar selected.
This suffers from the above issue as the text is never changed, it always uses the placeholder $(ud).
The next text box with the ID: text_box_with_action, solves the issue.
How it does this is by having a Node Changed, Set Value action setting the User Data Placeholder $(ud) to _self.
So on each node change the placeholder is being written to the text box.
When text is written the scroll bar will reset.
The third and last text box, with the ID text_scroller, is a little more complex but has the advantage of using the Scroll Area element.
This means you can style the scroller and keep consistency with say a thumbnail menu which also uses the scroll area.
Reset Text Box scroll bar on node change
- Hopki
- Gnome
- Posts: 13437
- Joined: Thu Jan 10, 2008 3:16 pm
- Location: Layer de la Haye, Essex UK
- Contact:
- Attachments
-
- project.zip
- (36.62 KiB) Downloaded 165 times
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/
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/