[Mono-bugs] [Bug 81678][Cos] New - RichTextBox as ReadOnly does not seem to display colors
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Fri May 18 18:10:14 EDT 2007
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by kaetemi at gmail.com.
http://bugzilla.ximian.com/show_bug.cgi?id=81678
--- shadow/81678 2007-05-18 18:10:14.000000000 -0400
+++ shadow/81678.tmp.29632 2007-05-18 18:10:14.000000000 -0400
@@ -0,0 +1,71 @@
+Bug#: 81678
+Product: Mono: Class Libraries
+Version: 1.2
+OS: GNU/Linux [Other]
+OS Details: Ubuntu
+Status: NEW
+Resolution:
+Severity:
+Priority: Cosmetic
+Component: Windows.Forms
+AssignedTo: toshok at ximian.com
+ReportedBy: kaetemi at gmail.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: RichTextBox as ReadOnly does not seem to display colors
+
+Description of Problem:
+In Mono the RichTextBox doesn't seem to be displaying text colors, when the
+box is set to ReadOnly.
+
+Steps to reproduce the problem:
+using System;
+using System.Windows.Forms;
+using System.Drawing;
+
+namespace rbtests
+{
+ static class Program
+ {
+ static void Main()
+ {
+ Form form = new Form();
+ RichTextBox rtb = new RichTextBox();
+ rtb.ReadOnly = true;
+ rtb.Dock = DockStyle.Fill;
+ rtb.SelectionColor = Color.Black;
+ rtb.AppendText("should be colored black");
+ rtb.SelectionColor = Color.Red;
+ rtb.AppendText("\r\nshould have a red color");
+ rtb.SelectionColor = Color.Empty;
+ rtb.AppendText("\r\nshould be default color");
+ rtb.SelectionColor = Color.Black;
+ rtb.AppendText("\r\nshould be colored black");
+ rtb.SelectionFont = new Font(rtb.SelectionFont, FontStyle.Bold);
+ rtb.AppendText(" and now bold");
+ rtb.SelectionColor = Color.Red;
+ rtb.AppendText("\r\nshould have a red color");
+ rtb.SelectionColor = Color.Empty;
+ rtb.AppendText("\r\nshould be default color");
+ form.Controls.Add(rtb);
+
+ Application.Run(form);
+ }
+ }
+}
+
+Actual Results:
+All lines are black, bold works ok.
+
+Expected Results:
+black red black black red black.
+
+How often does this happen?
+Every time.
+
+Additional Information:
+By the way, what's the most correct way of modifying the format for all the
+to-be-appended text? Also, would it be easier to do this in gtk#'s
+textview, and is there some kind of manual for that somewhere?
More information about the mono-bugs
mailing list