MultiRow Windows Forms > Developer's Guide > Using MultiRow > Cell Types > RichTextBoxCell |
The rich text box cell has features similar to the .NET Framework's RichTextBox control (System.Windows.Forms.RichTextBox). The user can use the rich text box cell to enter formatted text into the cell.
In addition to the Base Cell features, the rich text box cell can display and let users input formatted text. For more details on this feature, refer to the RichTextBoxCell class.
The rich text box cell uses the Object type value and this type can be checked with the RichTextBoxCell.ValueType property. The value cast into a String type is used for input and display. This type can be checked with the RichTextBoxCell.FormattedValueType property. Override the RichTextBoxCell.OnCellFormatting method to modify the behavior when values are read in a cell. Override the RichTextBoxCell.OnCellParsing method to modify behavior when the value is written back from the cell.
The rich text box cell value can be edited with the RichTextBoxEditingControl control. This control inherits from the IEditingControl interface and the System.Windows.Forms.RichTextBox class. The cell edit control type can be checked with the RichTextBoxCell.EditType property.
The rich text box cell supports the following CellStyle class members. You can set the cell style with the RichTextBoxCell.Style property.
CellStyle Members | Non-Editable State | Editable State |
---|---|---|
BackColor | Enabled | Enabled |
BackgroundGradientEffect | Enabled | - |
Border | Enabled | Enabled |
DataSourceNullValue | Enabled | Enabled |
DisabledBackColor | Enabled | - |
DisabledForeColor | - | - |
DisabledGradientEffect | Enabled | - |
EditingBackColor | - | Enabled |
EditingForeColor | - | - |
Font | - | - |
ForeColor | - | - |
Format | Enabled | Enabled |
FormatProvider | Enabled | Enabled |
Image | - | - |
ImageAlign | - | - |
ImeMode | Enabled | Enabled |
ImeSentenceMode | Enabled | Enabled |
InputScope | Enabled | Enabled |
LineAdjustment | Enabled | - |
Margin | Enabled | Enabled |
MouseOverBackColor | Enabled | - |
MouseOverForeColor | - | - |
MouseOverGradientEffect | Enabled | - |
Multiline | Enabled | Enabled |
NullValue | Enabled | Enabled |
Padding | Enabled | Enabled |
PatternColor | Enabled | - |
PatternStyle | Enabled | - |
SelectionBackColor | Enabled | - |
SelectionForeColor | - | - |
SelectionGradientEffect | Enabled | - |
Tag | Enabled | Enabled |
TextAdjustment | - | - |
TextAlign | - | - |
TextAngle | - | - |
TextEffect | - | - |
TextImageRelation | - | - |
TextIndent | - | - |
TextVertical | - | - |
UseCompatibleTextRendering | - | - |
WordWrap | Enabled | Enabled |
|
The following table lists keys processed when the rich text box cell is in edit mode and lists keys that are processed by the GcMultiRow control.
Modifier | Key | RichTextBoxCell | GcMultiRow |
---|---|---|---|
None | Keys.PageUp | Enabled | - |
Keys.PageDown | Enabled | - | |
Keys.End | Enabled | - | |
Keys.Home | Enabled | - | |
Keys.Left | Enabled | - | |
Keys.Right | Enabled | - | |
Keys.Up | Enabled | - | |
Keys.Down | Enabled | - | |
Keys.Insert | Enabled | - | |
Keys.Delete | Enabled | - | |
Keys.BackSpace | Enabled | - | |
Keys.Control | Keys.PageUp | Enabled | - |
Keys.PageDown | Enabled | - | |
Keys.End | Enabled | - | |
Keys.Home | Enabled | - | |
Keys.Left | Enabled | - | |
Keys.Right | Enabled | - | |
Keys.Up | Enabled | - | |
Keys.Down | Enabled | - | |
Keys.A | Enabled | - | |
Keys.C | Enabled | - | |
Keys.V | Enabled | - | |
Keys.X | Enabled | - | |
Keys.Shift | Keys.Left | Enabled | - |
Keys.Right | Enabled | - | |
Keys.Up | Enabled | - | |
Keys.Down | Enabled | - | |
Keys.Home | Enabled | - | |
Keys.End | Enabled | - |
|
You can use the GcMultiRow.CellContentClick event to implement processing when clicking in the cell content area. Use the GcMultiRow.CellContentDoubleClick event for a double-click. Use the GcMultiRow.CellEditedFormattedValueChanged event to catch any changes to the cell value. The RichTextBoxEditingControl class event is used to process the RichtextBoxCell editing event.