[Mono-bugs] [Bug 330495] New: Form: TextBox does not receive focus

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Oct 3 13:40:41 EDT 2007


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

           Summary: Form: TextBox does not receive focus
           Product: Mono: Class Libraries
           Version: 1.2
          Platform: x86
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Windows.Forms
        AssignedTo: mono-bugs at ximian.com
        ReportedBy: kobruleht2 at hot.ee
         QAContact: mono-bugs at ximian.com
          Found By: ---


To reproduce:

1. Run the code
2. Press some character key

Observed:

1. Key press is ignored
2. Caret it not visible


Environment:

MONO 1.2.5 .NET 2 profile
Windows XP


Code to reproduce:

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

static class AppDesktop {
        public static Form MainForm;
}

static class Program {
        [STAThread]
        static void Main() {
                AppDesktop.MainForm = new Form();
                AppDesktop.MainForm.IsMdiContainer = true;
                AppDesktop.MainForm.Show();
                Status s = new Status("working");
                for (int i = 0; i < 10; i++)
                        s.Log("Line " + i.ToString());

                Application.Run(AppDesktop.MainForm);
        }
}

public class Status : Form {

        TextBox lb;
        public Status(string title) {

                lb = new TextBox();
                lb.Dock = DockStyle.Fill;
                lb.Multiline = true;

                Controls.Add(lb);
                StartPosition = FormStartPosition.Manual;

                Text = title;
                Left = 0;
                MdiParent = AppDesktop.MainForm;

                Top = (int)(0.6 * (double)MdiParent.Height) - 60;
                Height = MdiParent.Height / 3;
                Width = MdiParent.Width - 60;
                Show();
        }

        public void Log(string s) {
                lb.Text += s;
                lb.Text += "\r\n";
                lb.Select(Text.Length + 1, 0);
                lb.ScrollToCaret();
                Application.DoEvents();
        }
}


-- 
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