Back to Devexpress

TdxTreeViewNodeTextEvent Type

vcl-dxtreeview-83e82c5c.md

latest1.8 KB
Original Source

TdxTreeViewNodeTextEvent Type

The text-related procedural type for tree nodes.

Declaration

delphi
TdxTreeViewNodeTextEvent = procedure(Sender: TdxCustomTreeView; ANode: TdxTreeViewNode; var AText: string) of object;

Parameters

NameTypeDescription
SenderTdxCustomTreeView

The Tree View control that raised a text-related event.

| | ANode | TdxTreeViewNode |

The target tree node.

| | AText | string |

A text string associated with the target tree node.

|

Remarks

The following OnHint event handler displays a string stored in a node’s Data property in the hint:

delphi
procedure TForm1.dxTreeViewControl1Hint(Sender: TdxCustomTreeView;
  ANode: TdxTreeViewNode; var AText: string);
begin
  if ANode.Data <> nil then
    try
        AText := string(ANode.Data^);
    except;
    end;
end;
cpp
void __fastcall TForm1::dxTreeViewControl1Hint(TdxCustomTreeView *Sender,
  TdxTreeViewNode *ANode, UnicodeString &AText)
{
  if (ANode->Data != nullptr)
    try
    {
        AText = *(UnicodeString *)ANode->Data;
    }
    catch(...)
    {
    }
}

The following Tree View events reference the TdxTreeViewNodeTextEvent type:

See Also

dxTreeView Unit