Skip to main content

TreeNode

Function TreeNode 

Source
pub fn TreeNode(_: TreeNodeProps) -> Element
Expand description

One node of a Tree: the line it hangs from (below the top level), its row — its branch, its chevron if it has parts, then row — and its parts, children, while it is open.

§Props

For details, see the props struct definition.

  • depth : usize

    How many levels below the top it sits.

  • last : bool

    The last of its siblings: its line stops at its own branch.

  • expandable : bool

    Whether it has parts to open; its row then leads with the chevron.

  • open : bool

    Whether its parts are shown.

  • selected : bool
  • stop : bool

    The row the tree’s one tab stop falls on when no row is selected: its first.

  • title : Option<String>

    The row’s tooltip.

  • on_press : Option<EventHandler<()>>

    What pressing the row does; a row with none is not pressable.

  • row : Element

    The row’s content after its chevron.

  • children : Element