Table of Contents

Method InsertColumn

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

InsertColumn(int, string?, float?, Action?)

Inserts a new column at the specified index with the given title and width.

public virtual ObjectUniqueId InsertColumn(int index, string? title, float? width = null, Action? onClick = null)

Parameters

index int

The zero-based index at which the column should be inserted. If the index is out of range, the column is added at the end.

title string

The title text to display on the column header.

width float?

The width of the column. If not specified will be calculated using width of the title.

onClick Action

An optional action to execute when the column header is clicked. Can be null.

Returns

ObjectUniqueId

The unique identifier of the newly inserted column.

Remarks

The method creates a column with a header that includes both text and an image, and aligns the content to the left. A splitter is also added next to the column for resizing purposes. The column and splitter are inserted into the layout at the specified index, or appended if the index is out of range.