Function zng_wgt_input::cmd::on_open

source ·
pub fn on_open(
    child: impl UiNode,
    handler: impl WidgetHandler<CommandArgs>,
) -> impl UiNode
Expand description

P On open command.

Receives OPEN_CMD command events scoped on the widget. The command parameter can be a path to open, otherwise the path must be derived from context or the user prompted.

You can use WINDOWS.native_file_dialog to prompt the user for a file or folder path.

§Preview

You can preview this command event using on_pre_open. Otherwise the handler is only called after the widget content has a chance to stop propagation.

§Async

You can use async event handlers with this property.