Class ListBoxHeader
Represents a header for a list box, providing functionality to manage columns and their visual appearance.
public class ListBoxHeader : HiddenBorder, IBaseObjectWithAttr, IBaseObjectWithId, INotifyPropertyChanged, IDisposableObject, IBaseObject, ISupportInitialize, IFocusable, ITextProperty, IComponent, IControl, IDisposable, IWin32Window, ILayoutItem, INotifyDataErrorInfo, IListBoxHeader
- Inheritance
-
ListBoxHeader
- Implements
Remarks
The ListBoxHeader class allows for the addition, deletion, and management of columns within a list box header. It provides properties to customize the appearance of column splitters and methods to manipulate columns.
Constructors
- ListBoxHeader()
Initializes a new instance of the ListBoxHeader class.
Properties
- ColumnControls
Gets an enumerable collection of SpeedButton controls that are identified as column controls.
- ColumnCount
Gets the number of columns represented by the child elements that are of type SpeedButton.
- FirstColumn
Gets the first child control in the collection that is identified as a column control.
- LastColumn
Gets the last column control in the collection.
- LastColumnControlIndex
Gets the index of the last child element that is a column control.
- SplitterBackColor
Gets or sets the background color of the column splitters.
- SplitterForeColor
Gets or sets the foreground color of the column splitters.
- SplitterForegroundVisible
Gets or sets a value indicating whether the splitter foreground is visible.
Methods
- AddColumn(string?, float?, Action?)
Adds a new column with the specified title and width to the control.
- AddColumnCore(string?, float?, Action?)
Adds a new column to the user interface with the specified title, width, and click action.
- DeleteColumn(ObjectUniqueId?)
Deletes the specified column and its associated splitter from the control.
- DeleteColumns()
Deletes all columns from the control.
- GetColumnControl(ObjectUniqueId?)
Retrieves a SpeedButton associated with the specified column identifier.
- GetColumnControlAt(int)
Retrieves the SpeedButton control at the specified index within the column controls.
- GetColumnSplitter(AbstractControl?)
Retrieves the splitter control attached to the specified column, if one exists.
- GetPreferredSize(PreferredSizeContext)
Retrieves the size of a rectangular area into which a control can be fitted, in device-independent units.
- GetSplitterWidth()
Gets the width of the splitter between columns.
- InsertColumn(int, string?, float?, Action?)
Inserts a new column at the specified index with the given title and width.
- InsertColumnCore(int, string?, float?, Action?)
Inserts a new column at the specified index with the given title, width, and optional click action.
- IsColumnControl(AbstractControl?)
Determines whether the specified control is a column control.
- OnColumnSizeChanged(AbstractControl)
Raises the event that notifies subscribers when the size of a column associated with the specified label control has changed.
- OnColumnVisibleChanged(AbstractControl)
Raises the event that notifies subscribers when the visibility of a column associated with the specified label control has changed.
- ResolveSplitterColors(out Color?, out Color?)
Resolves the splitter colors based on the current settings.
- SetColumnTitle(ObjectUniqueId, string?)
Sets the title of the specified column.
- SetColumnVisible(ListControlColumn?, bool)
Sets the visibility of the specified column in the control.
- SetColumnWidth(ObjectUniqueId, float?)
Sets the width of the specified column.
- SetIsColumnControl(SpeedButton, bool)
Sets a custom attribute on the specified control to indicate whether it is a column control.
Events
- ColumnDeleted
Occurs when a column is deleted from the header.
- ColumnInserted
Occurs when a column is inserted into the header.
- ColumnSizeChanged
Occurs when the width of a column changes.
- ColumnVisibleChanged
Occurs when the visibility of a column changes.