summaryrefslogtreecommitdiffstats
path: root/src/widget.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/widget.rs')
-rw-r--r--src/widget.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/widget.rs b/src/widget.rs
index abffadd5..2333aa28 100644
--- a/src/widget.rs
+++ b/src/widget.rs
@@ -211,3 +211,14 @@ pub use qr_code::QRCode;
#[cfg(feature = "svg")]
#[cfg_attr(docsrs, doc(cfg(feature = "svg")))]
pub use svg::Svg;
+
+use crate::Command;
+use iced_native::widget::operation;
+
+/// Focuses the next focusable widget.
+pub fn focus_next<Message>() -> Command<Message>
+where
+ Message: 'static,
+{
+ Command::widget(operation::focus_next())
+}