Skip to content

Columns header

Column header is an area with the columns' titles at the top of the treeview. To show it, enable the Options.Column.ShowColumnHeader treeview property. You can also change the header height by modifying the ColumnHeaderHeight treeview property.

Column title#

Every column displays a text title in the column's header, which is stored in the Text property. To control the column title, use these properties:

  • Text - column title text.
  • TextAlign - column title text alignment within the column header.
  • Font - column title font.
  • TextTrimming - defines the column title text trimming mode.

Column icon#

You can show an image in the column header by using the Image property. To change the image alignment, use the ImageAlign property.

Example

TreeColumn col = new TreeColumn("User name", 200);
col.Image = Resources.MyColumnImage;
col.ImageAlign = eColumnImageAlign.Right;
Dim col As New TreeColumn("User name", 200)
col.Image = Resources.MyColumnImage
col.ImageAlign = eColumnImageAlign.Right

Override header icons#

By default, Flexible TreeView uses System or Office2007 theme column header icons, but you can override them by using the Images treeview property.

Example

tree.Images.ColumnSortDown = mySortDownIcon;
tree.Images.ColumnSortUp = mySortUpIcon;
tree.Images.ColumnDragPositionMark = myDragIcon;
tree.Images.ColumnDragPositionMarkDenied = myDragDeniedIcon;
tree.Images.ColumnSortDown = mySortDownIcon
tree.Images.ColumnSortUp = mySortUpIcon
tree.Images.ColumnDragPositionMark = myDragIcon
tree.Images.ColumnDragPositionMarkDenied = myDragDeniedIcon

Columns selector#

When working with a treeview, the user may want to hide some columns. To do that, they can simply click the column header and select the Column chooser popup menu item.

Additionally, the column chooser dialog can be shown from the code by calling the ShowColumnChooseForm treeview method.

Additional API reference#

Properties#

  • SupportHtml - defines whether a column can show HTML text in the title.
  • Hoverable - defines whether a column changes the header appearance when the mouse is over it.