System.Windows.Forms.RichTextBox.SelectionCharOffset Property

Gets or sets whether text in the control appears on the baseline, as a superscript, or as a subscript below the baseline.

Syntax

[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
[System.ComponentModel.DefaultValue(0)]
[System.ComponentModel.Browsable(false)]
public int SelectionCharOffset { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

The value of this property must be between -2000 and 2000.

If this property is set to zero, the text appears on the baseline. If it is a positive number, the number specifies the number of pixels by which to raise the text selection above the baseline. If it is a negative number, this number specifies the number of pixels by which to subscript the text selection. You can use this property to specify text as superscript or subscript.

If no text is selected, the offset is applied to the current insertion point and to all text that the user types after the insertion point. The character offset applies until the property is changed to a different value or until the insertion point is moved to a different section within the control.

If text is selected within the control, the selected text and any text entered after the text selection will have the value of this property applied to it. You can use this property to create superscript and subscript text for such applications as mathematical expressions.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0