Hello Iced community,
I’m working on an application where I have several views with TextInput
widgets, and I’d like to detect when they gain focus in order to dispatch a specific message. I’ve assigned an Id
to my TextInput
widgets like this:
let text_input = TextInput::new("", save_name)
.id(Id::new("save_preset_input"));
I’ve looked into the find_focused
operation, but I’m unsure how to proceed with it, or even if it’s the right tool for this job. I haven’t found a built-in on_focus
event for TextInput
. Could anyone guide me on how to properly use commands, or any other mechanism, to detect when a TextInput
is focused and dispatch a message in response?
Any advice or examples would be greatly appreciated.
Thank you!