Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TreeList.CalcNodeHeight Event

Allows you to assign custom node height.

Namespace: DevExpress.XtraTreeList

Assembly: DevExpress.XtraTreeList.v24.2.dll

NuGet Packages: DevExpress.Win.Navigation, DevExpress.Win.TreeList

#Declaration

[DXCategory("Behavior")]
public event CalcNodeHeightEventHandler CalcNodeHeight

#Event Data

The CalcNodeHeight event's data class is CalcNodeHeightEventArgs. The following properties provide information specific to this event:

Property Description
Node Gets the current Tree List node. Inherited from NodeEventArgs.
NodeHeight Gets or sets the current node’s height in pixels.

#Remarks

Write a CalcNodeHeight event handler to assign custom node height for the TreeList control. The event fires for each visible node each time a node’s look & feel is affected. The parameter transmitted to the event allows you to identify a node whose height is calculated and assign the appropriate custom height.

Note: the CalcNodeHeight event fires only if the TreeListOptionsBehavior.AutoNodeHeight option is disabled.

Use the CalcNodeHeight event if you want to assign different node heights to the TreeList control. If you want to assign the same height to all nodes, use the TreeList.RowHeight property instead.

See Also