Created a ScrollContainer then added a MarginContainer as a child, then added a RichTextLabel as a child to the MarginContainer.
For the RichTextLabel I set the scroll_active=false so that its scrollbar wouldn’t show. Then I adjusted the MarginContainer’s margin_right to my desired spacing.
Lastly, since I’m adding bbcode_text via gdscript, I needed to set the min height of the RichTextLabel like so to get the ScrollContainer’s scrollbar to work:
self.rect_min_size.y = self.get_content_height()
I was wondering if you were going to use a MarginContainer. Glad that you solved it.
Ertain | 2020-06-13 17:36
Yeah, I was just hoping that the RichTextLabel had its own margin or separation value for its scrollbar, so I wouldn’t have to hide it and create two additional nodes.
eod | 2020-06-13 20:05
RichTextLabel.get_content_height() has error
you nedd wait 1 frame with yield and after get_content_height()