LineEdit auto select

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

How do I get lineEdit auto selected when I enter a scene?

Every time I enter a new scene with a lineEdit I need to click on the lineEdit to have it active. Is there a way to have it automatically active ?

:bust_in_silhouette: Reply From: Adam_S

You can use grab_focus().

func _ready():
    $LineEdit.grab_focus()