#region Private & Internal Methods
private void RichTextBox_LostFocus(object sender, EventArgs e) {
- has_focus = false;
Invalidate();
}
private void RichTextBox_GotFocus(object sender, EventArgs e) {
- has_focus = true;
Invalidate();
}
#endregion // Private & Internal Methods
[Browsable(false)]
[EditorBrowsable(EditorBrowsableState.Never)]
public override System.Drawing.Image BackgroundImage {
- get {
- return background_image;
- }
-
- set {
- base.BackgroundImage = value;
- }
+ get { return base.BackgroundImage; }
+ set { base.BackgroundImage = value; }
}
[DefaultValue(0)]
// Font changes always set the whole doc to that font
start = document.GetLine(1);
end = document.GetLine(document.Lines);
- document.FormatText(start, 1, end, end.text.Length + 1, base.Font, new SolidBrush(this.ForeColor));
+ document.FormatText(start, 1, end, end.text.Length + 1, base.Font, null, null, FormatSpecified.Font);
}
}
}
}
InsertRTFFromStream(data, 0, 1);
+
+ document.PositionCaret (document.GetLine (1), 0);
+ document.SetSelectionToCaret (true);
+ ScrollToCaret ();
}
[MonoTODO("Make smarter RTF detection?")]
line = document.GetLine(rtf_cursor_y);
if (rtf_line.Length > 0) {
document.InsertString(line, rtf_cursor_x, rtf_line.ToString());
- document.FormatText(line, rtf_cursor_x + 1, line, rtf_cursor_x + 1 + length, font, rtf_color); // FormatText is 1-based
+ document.FormatText(line, rtf_cursor_x + 1, line, rtf_cursor_x + 1 + length, font, rtf_color, null, FormatSpecified.Font | FormatSpecified.Color); // FormatText is 1-based
}
if (newline) {
document.Split(line, rtf_cursor_x + length);