Color Box Cell

Represents a cell containing a color box and an optional text.

Namespace: LSOne.Controls.Cells

Assembly: LSOne.Controls.ListView

Syntax

public class ColorBoxCell : Cell

Color box cell

Color box cell

Constructors

Name Description
ColorBoxCell() Default constructor. Initializes a new instance of the ColorBoxCell class
ColorBoxCell(byte, System.Drawing.Color, System.Drawing.Color) Initializes a new instance of the ColorBoxCell class with the given margin, background color and border color.
ColorBoxCell(byte, System.Drawing.Color, Syste.Drawing.Color, bool) Initializes a new instance of the ColorBoxCell class with the given margin, background color, border color and if click event is supported
ColorBoxCell(byte, System.Drawing.Color, Syste.Drawing.Color, short, string) Initializes a new instance of the ColorBoxCell class with the given margin, background color, border color, indent and text
ColorBoxCell(byte, System.Drawing.Color, Syste.Drawing.Color, short, string, bool) Initializes a new instance of the ColorBoxCell class with the given margin, background color, border color, indent, text and if click event is supported

Properties

Name Description
BorderColor Gets or sets the border color
BoxColor Gets or sets the background color
Clickable

Gets or sets if the color box supports click event.

Default value: false

Indent Gets or sets the margin to the cell borders. A smaller indent means a bigger color box.
MaxWidth Gets or sets the maximum width of the color box
TextAreaSpace Gets or sets the width of the text displayed in front of the color box

Examples

 

See Source\SM\Plugins\UserInterfaceStyles\Views\StylesView.cs from DevPack for usage examples.

 


Row row = new Row();
				
row.AddCell(new ColorBoxCell(5, Color.DarkSeaGreen, Color.Black));
row.AddCell(new ColorBoxCell(5, Color.DarkBlue, Color.Black, 70, "Some text"));

listView1.AddRow(row);

See also