get size of children node

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

i want to get size of all node in c .how to do that .

2)i have 3 children in HBoxContainer .so i want to put 1st children left side ,2nd children in middle and last one in right .and i want to put separation between them according to the screen width .please tell me

i am new in godot .

extends HBoxContainer

func _ready():
#var a=get_tree().root.get_child(0)
#set_position(Vector2( a.get_viewport().size)-get_size()-Vector2(100,0 ))
var c=self.get_children()
for i in c:

:bust_in_silhouette: Reply From: exuin

Well, Control nodes have rect_size instead of size. But I think you should use the “Expand” size flag instead of trying to manually but separation between them.

:bust_in_silhouette: Reply From: scrubswithnosleeves

Answered this live on stream: