Function zng::popup::context_capture

source ยท
pub fn context_capture(
    child: impl UiNode,
    capture: impl IntoVar<ContextCapture>,
) -> impl UiNode
Expand description

P Defines if the popup captures the local context to load in the popup context.

This is enabled by default and lets the popup use context values from the widget that opens it, not just from the window LAYERS root where it will actually be inited. There are potential issues with this, see ContextCapture for more details.

Note that updates to this property do not affect popups already open, just subsequent popups. This property must be set on the widget that opens the popup or a parent, not the popup widget itself.

This property sets the CONTEXT_CAPTURE_VAR.