vcl-dxtreeview-85b2d765.md
The action permission procedural type for tree nodes.
TdxTreeViewNodeAllowEvent = procedure(Sender: TdxCustomTreeView; ANode: TdxTreeViewNode; var Allow: Boolean) of object;
| Name | Type | Description |
|---|---|---|
| Sender | TdxCustomTreeView |
The Tree View control that raised an action permission event.
| | ANode | TdxTreeViewNode |
The target tree node.
| | Allow | Boolean |
Assign False to this parameter to prohibit users from performing the action. To allow the action, assign False to the parameter.
|
The OnCollapsing event handler below prohibits the control from collapsing nodes at the top nesting level:
procedure TForm1.dxTreeViewControl1Collapsing(Sender: TdxCustomTreeView;
ANode: TdxTreeViewNode; var Allow: Boolean);
begin
if ANode.Parent = Sender.Root then
Allow := False;
end;
void __fastcall TForm1::dxTreeViewControl1Collapsing(TdxCustomTreeView *Sender,
TdxTreeViewNode *ANode, bool &Allow)
{
if (ANode->Parent == Sender->Root)
Allow = false;
}
The following Tree View events reference the TdxTreeViewNodeAllowEvent type:
See Also