TreeRowHighlight

Package: Libraries.Interface.Controls · Inherits from: Libraries.Interface.Item, Libraries.Interface.Controls.Control, Libraries.Interface.Item2D, Libraries.Language.Object

The TreeRowHighlight class is the rounded band behind a tree row that shows it is selected or that the mouse (or a finger) is over it. Each TreeItem has one, hidden until it is needed, and stretches it across the tree's width. It uses the TreeItem colors from the interface options: the selection color, the unfocused selection color when the tree doesn't have the focus, and the mouse over color. Most programs never use this class directly.

Example Code

use Libraries.Interface.Forms.Form
use Libraries.Interface.Forms.Page
use Libraries.Interface.Controls.Tree
use Libraries.Interface.Controls.TreeItem

Form form
Page page = form:GetMainPage()
Tree tree = page:AddTree("Files")

TreeItem hero
hero:SetName("Hero.quorum")
tree:Add(hero)

// Selecting an item shows its row's highlight behind it.
hero:Select()

form:Display()

Actions

IsRenderingFocus()

The control shader draws the unfocused selection color when this returns false. The band itself never has the focus; this reports whether its tree does.

Returns

boolean

LoadGraphics(Libraries.Interface.Layouts.LayoutProperties properties)

This action is used to load the graphics of the highlight. The first time it is called, it gives the highlight a ControlShaderView, which draws the rounded band in the colors from the interface options. This is handled automatically, and most programs never call it directly.

Parameters

SetShowsFocus(boolean shows)

The SetShowsFocus action sets whether a selection is drawn in the selection color (the tree has the focus) or in the unfocused selection color.

Parameters

  • shows boolean: True to draw the selection in the focused color.

Inherited Actions

262 actions from Libraries.Interface.Controls.Control
61 actions from Libraries.Interface.Item
202 actions from Libraries.Interface.Item2D
3 actions from Libraries.Language.Object