[Mono-list] Very simple bug in Mono 2.2

LKeene lionel.keene at gmail.com
Tue Apr 28 18:43:19 EDT 2009


Consider this very simple WinForms application which executes properly in
Microsoft .NET framework but on Mono doesn't function correctly:


namespace BugForm
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            
            // Instantiate Panel control:
            Panel MyPanel           = new Panel();
            MyPanel.BackColor     = Color.Black;
            MyPanel.Size             = new Size(100, 100);
            MyPanel.MaximumSize = MyPanel.Size; // This line appears to be
the culprit.
            MyPanel.Location       = new Point(0, 0);
            this.Controls.Add(MyPanel);

            // Display Panel size in Title bar:
            this.Text = "Height: " + MyPanel.Height.ToString() + " Width: "
+ MyPanel.Width.ToString();
        }
    }
}
-- 
View this message in context: http://www.nabble.com/Very-simple-bug-in-Mono-2.2-tp23287498p23287498.html
Sent from the Mono - General mailing list archive at Nabble.com.



More information about the Mono-list mailing list