can you show me an example of how I can modify the properties

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By mikbauer

I tried the following but it does not work:
func _process(delta):
for child in $GridContainer.get_children(): = “New Text”

I get Error:
Invalid set index ‘text’ (on base: ‘String’) with value of type ‘String’.

:bust_in_silhouette: Reply From: jgodfrey

For future, you’re probably best off keeping this kind of conversation in the original question, but at least you’ve referenced it here…

Your problem is that both name and text are individual properties of a button. To change the text, you just want this:

child.text = "New text"

thanks jgodfrey for your help. one more question
if I want to access custom_styles/normal of the button how do I do it?
I tried
child[“custom_styles/normal”].bg_color = Color(“#bada55”)
but they dont work not sure why?

mikbauer | 2023-01-09 20:01