[Mono-bugs] [Bug 351938] New: RichTextBox: using SelectionFont with no selection and typing problems

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sun Jan 6 19:08:37 EST 2008


           Summary: RichTextBox: using SelectionFont with no selection and
                    typing problems
           Product: Mono: Class Libraries
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: ASSIGNED
          Severity: Normal
          Priority: P5 - None
         Component: Windows.Forms
        AssignedTo: luke.a.page at gmail.com
        ReportedBy: luke.a.page at gmail.com
         QAContact: mono-bugs at ximian.com
          Found By: ---

1) call SelectionFont to change the current font
2) Type something using the keyboard (e.g. not using AppendText)
3) The new text does not have the new font

Using the example program, additionally setting the font and clicking on the
textbox and then typing text causes a NRE and setting a font of a different
height shows the cursor to be much larger, where as in the MS implementation
the cursor and line re-drawing for the new font size only occurs once text has
been entered.

namespace rbtests {
        static class Program {
                static RichTextBox rtb = null;

                static void Main ()
                        Form form = new Form ();
                        rtb = new RichTextBox ();
                        rtb.Dock = DockStyle.Bottom;
                        Button button = new Button ();
                        button.Text = "Font";
                        button.Dock = DockStyle.Top;
                        button.Click += new EventHandler (button_Click);

                        form.Controls.Add (button);
                        form.Controls.Add (rtb);

                        Application.Run (form);

                static void button_Click (object sender, EventArgs e)
                        FontDialog dialog = new FontDialog ();
                        dialog.ShowDialog ();

                        rtb.SelectionFont = dialog.Font;

Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

More information about the mono-bugs mailing list