Function zng_wgt_fill::background

source ยท
pub fn background(child: impl UiNode, background: impl UiNode) -> impl UiNode
Expand description

P Custom background. Allows using any other UI node as a background.

The background is not interactive, it is hit-testable only as a visual of the widget. The background is layout to fill the widget, it does not affect the size of the widget.

Note that nodes can only exist in a single place in the UI tree at a time, so if you set this property in a style the background node will only appear in the last widget that uses the style, the background_fn property does not have this issue.