#region private and protected fields
protected string _text;
TextAlignment _textAlignment;
- bool _multiline;
- Color cursorColor;
+ bool _multiline;
Color selBackground;
Color selForeground;
protected FontExtents fe;
protected TextExtents te;
#endregion
- /// <summary>
- /// Background color for selected text inside this label.
- /// </summary>
- [DefaultValue ("White")]
- public virtual Color CursorColor {
- get { return cursorColor; }
- set {
- if (cursorColor == value)
- return;
- cursorColor = value;
- NotifyValueChangedAuto (cursorColor);
- RegisterForRedraw ();
- }
- }
+
/// <summary>
/// Background color for selected text inside this label.
if (value == _multiline)
return;
_multiline = value;
- lines = new LineCollection (_multiline ? 4 : 1);
+ getLines ();
NotifyValueChangedAuto (_multiline);
RegisterForGraphicUpdate();
}
//}
Rectangle c = ScreenCoordinates (textCursor.Value + Slot.Position + ClientRectangle.Position);
ctx.ResetClip ();
- ctx.SetSource (cursorColor);
+ Foreground.SetAsSource (IFace, ctx, c);
ctx.LineWidth = 1.0;
ctx.MoveTo (0.5 + c.X, c.Y);
ctx.LineTo (0.5 + c.X, c.Bottom);