WinForms › Tree List View › BinaryTreeListViewOffice2007ColorPickerCell
BinaryTreeListViewOffice2007ColorPickerCell
class.NET 6 / 8 / 10.NET Framework 4.8Binarymission.WinForms.Controls.TreeControls
A specialized cell type that uses Binarymission's BinaryOffice2007ColorPickerComboBox control as its cell editor.
public class BinaryTreeListViewOffice2007ColorPickerCell : DataGridViewTextBoxCell //DataGridViewComboBoxCell
Inherits from / implements: DataGridViewTextBoxCell //DataGridViewComboBoxCell
Members at a glance
BinaryTreeListViewOffice2007ColorPickerCell | Initializes a new instance of the BinaryTreeListViewOffice2007ColorPickerCell class. |
DefaultNewRowValue | Gets the value this cell starts with on the grid's new-row placeholder. |
EditType | Gets the type of the control this cell uses for editing. |
ValueType | Gets the type of the value this cell holds. |
InitializeEditingControl | Prepares the editing control that this cell hands to the grid, pushing the cell's own settings onto it before editing starts. |
Paint | Paints this cell. The base implementation draws the standard cell; this override adds the parts specific to BinaryTreeListViewOffice2007ColorPickerCell. |
Constructors
BinaryTreeListViewOffice2007ColorPickerCell
public BinaryTreeListViewOffice2007ColorPickerCell() : base()
Initializes a new instance of the BinaryTreeListViewOffice2007ColorPickerCell class.
Properties
DefaultNewRowValue
public override object DefaultNewRowValue
Gets the value this cell starts with on the grid's new-row placeholder.
EditType
public override Type EditType
Gets the type of the control this cell uses for editing.
ValueType
public override Type ValueType
Gets the type of the value this cell holds.
Methods
InitializeEditingControl
public override void InitializeEditingControl(int rowIndex, object initialFormattedValue, DataGridViewCellStyle dataGridViewCellStyle)
Prepares the editing control that this cell hands to the grid, pushing the cell's own settings onto it before editing starts.
Paint
protected override void Paint(Graphics graphics, Rectangle clipBounds, Rectangle cellBounds, int rowIndex, DataGridViewElementStates cellState, object value, object formattedValue, string errorText, DataGridViewCellStyle cellStyle, DataGridViewAdvancedBorderStyle advancedBorderStyle, DataGridViewPaintParts paintParts)
Paints this cell. The base implementation draws the standard cell; this override adds the parts specific to BinaryTreeListViewOffice2007ColorPickerCell.
The value - a swatch and a label, or a fill with the label on it - is drawn on every row. With
SpecialColumnCellsToDisplayEditingControlOnCellsAlways on, the row also shows the picker's chrome: a hairline box while the column's ShowBorderAlways is on, and the drop-down button while its ShowDropDownButtonWhenCellNotInEditingMode is - flat, or the classic push button when DrawStyleIsFlat is off. Until 2026-09 (HANDOVER 3av) this cell painted nothing at all with that switch off, never read ShowColorNameIfKnownColor , drew its label centred across the swatch, outlined the whole cell in the text colour, and ignored the row's selection.