IDimensionNodeGetImageEventArgs.State

Syntax

State: Integer;

Description

The State property returns the current state of the element, for which the event is generated. The list of available element states is determined in the DimensionViewerNodeState enumeration type.

Example

Executing the example requires a form with the Button1 button, the DimensionTree component named DimensionTree1 and the UiDimension component, which is a data source for DimensionTree1. The following procedure is set for the OnGetNodeImage event handling of the DimensionTree1 component.

Sub DimensionTree1OnGetNodeImage(Sender: Object; Args: IDimensionNodeGetImageEventArgs);

Begin

Select Case Args.State

Case DimensionViewerNodeState.None: Args.ImageIndex := -1;

Case DimensionViewerNodeState.Selected: Args.ImageIndex := 0;

Case DimensionViewerNodeState.Focused: Args.ImageIndex := 1;

Case DimensionViewerNodeState.SelectedFocused: Args.ImageIndex := 2;

End Select;

End Sub DimensionTree1OnGetNodeImage;

After executing the example, on occurring the event the element image is changed according to the element state (such as Selected, Focused, Selected and focused).

See also:

IDimensionNodeGetImageEventArgs

DimensionViewerNodeState