[Mono-bugs] [Bug 330986] New: Newline in form caption

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Oct 4 18:57:59 EDT 2007


https://bugzilla.novell.com/show_bug.cgi?id=330986

           Summary: Newline in form caption
           Product: Mono: Class Libraries
           Version: 1.2
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: Minor
          Priority: P5 - None
         Component: Windows.Forms
        AssignedTo: mono-bugs at ximian.com
        ReportedBy: equistango at gmail.com
         QAContact: mono-bugs at ximian.com
          Found By: ---


The following issues occur when a form has a new line in it's caption.
On Windows: MDI child window title bar will show a two-line text.
On Linux: regular forms will truncate the text on the new line and MDI child
window title bar will show a two-line text, just like on Windows.

The expected behavior is that non-printable characters are rendered as a box or
another printable character.

using System;
using System.Windows.Forms;
using System.IO;

static class Program {

        [STAThread]
        static void Main() {
                Form MainForm = new Form();
                MainForm.Text = "This is a " + System.Environment.NewLine +
"test";
                MainForm.IsMdiContainer = true;
                MainForm.Show();
                ChildForm s = new ChildForm(MainForm);
                s.Text = "This is a " + System.Environment.NewLine + "test";
                s.Show();
                Application.Run(MainForm);
        }
}

public class ChildForm : Form {

        public ChildForm(Form parent)
        {
                MdiParent = parent;
        }
}


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


More information about the mono-bugs mailing list