TextFlag CellAlignment { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The CellAlignment property of the ControlWidget class specifies how the control should be aligned within a grid cell. If no specific alignment is set, the control will fill the entire cell by default. This property is virtual, allowing derived classes to override its behavior if necessary.

Usage

To use the CellAlignment property, you can get or set its value to control the alignment of a widget within a grid cell. This is particularly useful when designing custom editor interfaces where precise control over layout is required.

Example

// Example of setting the CellAlignment property
ControlWidget widget = new MyCustomControlWidget();
widget.CellAlignment = TextFlag.Center; // Aligns the control to the center of the cell

// Example of getting the CellAlignment property
TextFlag alignment = widget.CellAlignment;
if (alignment == TextFlag.None)
{
    // The control will fill the entire cell
}