on_pre_save

Function on_pre_save 

Source
pub fn on_pre_save(
    child: impl IntoUiNode,
    handler: Handler<CommandArgs>,
) -> UiNode
Expand description

P On save command.

Receives SAVE_CMD command events scoped on the widget. Usually saves to the last open or save path, otherwise prompt the user like on_save_as.

§Command

This property will subscribe to the SAVE_CMD command scoped on the widget. If set on the Window! root widget it will also subscribe to the command scoped on the window.

The command handle is enabled by default and can be disabled using the contextual property can_save .

§Route

This event property uses the preview route, that is, the handler is called before the children widget handlers and before the $pn_ident handlers.