-
My app consists of multiple LineEdits. How can I make my app to go to next LineEdit by pressing enter key in order to save time and to avoid using the mouse? |
Beta Was this translation helpful? Give feedback.
Answered by
tronical
Jan 2, 2025
Replies: 1 comment
-
You could go via the import { VerticalBox, LineEdit } from "std-widgets.slint";
export component Demo {
forward-focus: first-name;
VerticalBox {
alignment: start;
first-name := LineEdit {
placeholder-text: "First Name";
accepted(text) => { last-name.focus(); }
}
last-name := LineEdit {
placeholder-text: "Last Name";
accepted(text) => { age.focus(); }
}
age := LineEdit {
placeholder-text: "Age";
}
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
tronical
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You could go via the
accepted
callback and explicitly callfocus()
on the nextLineEdit
, like this:(SlintPad Link)