0 votes

I'm nob in Godot and I have filled optionbutton with text from a csv file and I try to transfer the choosen text value to a richtextlabel. Can someone advice me with either a turtorial or a sample.

Godot version 3.2.3
in Engine by (16 points)

1 Answer

0 votes

Connect and use the item_selected signal as follows

func _on_OptionButton_item_selected(_index):
    $RichTextLabel.text = $OptionButton.text

#if you want the text set on creation as well
func _ready():
    $RichTextLabel.text = $OptionButton.text
by (4,112 points)
Did't understand
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.