[]
Moves the current range by the specified offset and length.
public void Move(int offset, int length)
Type | Name | Description |
---|---|---|
int | offset | Specifies the number of characters to offset the current text range in relation to the current start of the range. |
int | length | Specifies the new length of the range. |
The example marks a character before the selection using yellow color.
private void c1Editor1_SelectionChanged(object sender, EventArgs e)
{
if (_colored != null)
{
_colored.RemoveStyle("color", "yellow");
_colored = null;
}
C1TextRange sel = c1Editor1.Selection.Clone();
sel.Move(-1, 1);
sel.ApplyStyle("color", "yellow", C1StyleType.Character);
_colored = sel;
}
private C1TextRange _colored = null;