Check Box Cell
Represents a cell containing a checkbox.
Namespace: LSOne.Controls.Cells
Assembly: LSOne.Controls.ListView
Syntax
public class CheckBoxCell : ExtendedCell
Constructors
Name | Description |
---|---|
CheckBoxCell() | Default constructor. Initializes a new instance of the CheckBoxCell class. |
CheckBoxCell(bool) | Initializes a new instance of the CheckBoxCell class with the given checked state |
CheckBoxCell(bool, bool) | Initializes a new instance of the CheckBoxCell class with the given checked and enabled state |
CheckBoxCell(bool, bool, LSOne.Controls.Cells.CheckBoxCell.CheckBoxAlignmentEnum) | Initializes a new instance of the CheckBoxCell class with the given checked and enabled state and horizontal alignment |
CheckBoxCell(bool, LSOne.Controls.CheckBox.CheckBoxAlignmentEnum) | Initializes a new instance of the CheckBoxCell class with the given checked state and horizontal alignment |
CheckBoxCell(string, bool) | Initializes a new instance of the CheckBoxCell class with the given text and checked state |
CheckBoxCell(string, bool, bool) | Initializes a new instance of the CheckBoxCell class with the given text and checked and enabled state |
CheckBoxCell(string, System.Drawing.Image, bool) | Initializes a new instance of the CheckBoxCell class with the given text, image and checked state |
CheckBoxCell(string, System.Drawing.Image, bool, bool) | Initializes a new instance of the CheckBoxCell class with the given text, image and checked and enabled state |
Properties
Name | Description |
---|---|
CheckBoxAlignment |
Gets or sets the horizontal alignment of the checkbox Possible values:
Default value: Left |
CheckboxLeftIndent | Gets or sets the horizontal offset of the control's content |
Checked | Gets or sets the checked state (as a Boolean) of the contained checkbox |
CheckState |
Gets or sets the check state of the contained checkbox. Possible values:
|
Enabled | Gets or sets if the checkbox is enabled |
ThreeState | Gets or sets if the checkbox supports three states or only checked / unchecked |
Methods
Name | Description |
---|---|
BumpCheckState() | Changes the check state to the opposite value. For three-state CheckBoxCell, unchecked switches to checked and checked to indeterminate. |
CompareTo(object) | Compares this instance with a specified Object based on SortRank, Text and checked state |
Examples
See Source\SM\Plugins\SerialNumbers\Views\SerialNumbersView.cs and Source\Core\Common_services\CustomerOrderService\Panels\SearchPanel.cs from DevPack for usage examples.
Row row = new Row();
Controls.Cells.CheckBoxCell cell = new Controls.Cells.CheckBoxCell(customer.CashCustomer);
cell.Enabled = false;
cell.CheckBoxAlignment = LSOne.Controls.Cells.CheckBoxCell.CheckBoxAlignmentEnum.Center;
row.AddCell(cell);
row.Tag = customer;
lvCustomers.AddRow(row);