on_copy

Function on_copy 

Source
pub fn on_copy(
    child: impl IntoUiNode,
    handler: Box<dyn FnMut(&CommandArgs) -> HandlerResult + Send>,
) -> UiNode
Expand description

P On copy command.

Receives COPY_CMD command events scoped on the widget. You can use the CLIPBOARD service to send data to the clipboard.

§Command

This property will subscribe to the COPY_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_copy .

§Route

This event property uses the normal route, that is, the handler is called after the children widget handlers and after the $pn_pre_ident handlers.