#Cannot add text to RichTextLabel when initialising

6 messages · Page 1 of 1 (latest)

patent wedge
#

can you show where you call this method?

wet storm
#

Cannot add text to RichTextLabel when initialising

patent wedge
#

It seems that .text only really reflects whatever you put into it, and won't synchronize with the label's internal stack if you modify it in other ways.

#
    var new_letter: RichTextLabel = RichTextLabel.new()
    var letter = "Hello"
    add_child(new_letter)
    print("letter to add is: \'", letter, "\'")
    new_letter.add_text(letter)
    print("Text after adding letter is \'", new_letter.get_parsed_text(), "\'")
    new_letter.append_text(letter)
    print("Text after adding letter is \'", new_letter.get_parsed_text(), "\'")```
#

Prints out: