Cell
Base class for displaying data in the List View
Namespace: LSOne.Controls.Cells
Assembly: LSOne.Controls.ListView
Syntax
public class Cell : IComparable
Constructors
Name | Description |
---|---|
Cell() | Default constructor. Initializes a new instance of the Cell class |
Cell(string) | Initializes a new instance of the Cell class with the given text |
Cell(string, LSOne.Controls.Style) | Initializes a new instance of the Cell class with the given text and styling |
Properties
Name | Description |
---|---|
*ActionSupressesSelection |
Gets if the row index of the cell is added to the selection in the parent ListView when the cell action is executed * protectedDefault value: true |
*DontSuppressDoubleClick |
Gets whether this cell wants the double click event from the parent ListView to be suppressed or not * protectedDefault value: false |
HorizontalAlignment |
Gets or sets the horizontal alignment of the control's content Possible values:
|
LeftIndent | Gets or sets the horizontal offset of the control's content |
SortRank |
Controls that text cells are not sorted together with numberic ones and in which order they will come Default value: 10 |
Text | Gets or sets the text displayed in the cell |
TopIndent | Gets or sets the vertical offset of the control's content |
VerticalAlignment |
Gets or sets the vertical alignment of the control's content Possible values:
|
Methods
Name | Description |
---|---|
CompareTo(object) | Compares this instance with a specified Object based on SortRank and Text |
GetStyle() | Returns the style of the control |
SetStyle(SLOne.Controls.Style) | Sets the syle of the control |
Examples
See \Source\SM\Plugins\RetailItems\Dialogs\ItemTypeDialog.cs from DevPack for usage examples.
Style greenStyle = new Style(lvlEditPreview.DefaultStyle);
greenStyle.TextColor = ColorPalette.GreenDark;
Style redStyle = new Style(lvlEditPreview.DefaultStyle);
redStyle.TextColor = ColorPalette.RedDark;
row.AddCell(new Cell(line.Text, greenStyle));
row.AddCell(new Cell(line.ExtendedText, redStyle));
row.AddCell(new IconButtonCell(button, IconButtonCell.IconButtonIconAlignmentEnum.Right, "", false));