MultiRow Windows Forms > Developer's Guide > Using MultiRow > Cell Types > ShapeCell |
The shape cell provides the ability to display shapes. You can use the shape cell to display shapes such as triangle, circle, square, and so on, in the cell at design time, without writing a single line of code.
In addition to the Base Cell features, the shape cell can also display shapes.
For more details on this feature, refer to the ShapeCell class.
The shape cell uses the Object value type. This type can be checked with the ShapeCell.ValueType property.
The text shown in the list label uses a value that has been type cast to a String type. This type can be checked with the ShapeCell.FormattedValueType property.
You can modify type cast behavior by overriding the Object type ToString method. Override the ShapeCell.OnCellFormatting method to change behavior when a value is read in a cell. Override the ShapeCell.OnCellParsing method to change behavior when a value is written back from the cell.
The shape cell does not provide a cell edit control. The ShapeCell.EditType property always returns a null reference (Nothing in Visual Basic).
The shape cell supports the following CellStyle class members. You can set the cell style with the ShapeCell.Style property.
CellStyle Members | Enabled or Disabled |
---|---|
BackColor | Enabled |
BackgroundGradientEffect | Enabled |
Border | - |
DataSourceNullValue | Enabled |
DisabledBackColor | Enabled |
DisabledForeColor | Enabled |
DisabledGradientEffect | Enabled |
EditingBackColor | - |
EditingForeColor | - |
Font | Enabled |
ForeColor | Enabled |
Format | Enabled |
FormatProvider | Enabled |
Image | Enabled |
ImageAlign | Enabled |
ImeMode | - |
ImeSentenceMode | - |
InputScope | - |
LineAdjustment | Enabled |
Margin | Enabled |
MouseOverBackColor | Enabled |
MouseOverForeColor | Enabled |
MouseOverGradientEffect | Enabled |
Multiline | Enabled |
NullValue | Enabled |
Padding | Enabled |
PatternColor | Enabled |
PatternStyle | Enabled |
SelectionBackColor | Enabled |
SelectionForeColor | Enabled |
SelectionGradientEffect | Enabled |
Tag | Enabled |
TextAdjustment | Enabled |
TextAlign | Enabled |
TextAngle | Enabled |
TextEffect | Enabled |
TextImageRelation | Enabled |
TextIndent | Enabled |
TextVertical | Enabled |
UseCompatibleTextRendering | Enabled |
WordWrap | Enabled |
To enable GDI+ Compatibility Mode, set the CellStyle.UseCompatibleTextRendering property to True.
No shortcut keys are handled in a shape cell.
You can use the GcMultiRow.CellContentClick event to catch a click in the cell content area. You can use the GcMultiRow.CellContentDoubleClick event for a double-click.
For more information, see Setting Shapes (ShapeCell).