[Mono-bugs] [Bug 507459] New: ToolStripComboBox does not conside Handled

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed May 27 09:40:07 EDT 2009


http://bugzilla.novell.com/show_bug.cgi?id=507459


           Summary: ToolStripComboBox does not conside Handled
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.4.x
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Minor
          Priority: P5 - None
         Component: Windows.Forms
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: mario.suric at yahoo.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US)
AppleWebKit/525.19 (KHTML, like Gecko) Chrome/1.0.154.65 Safari/525.19

Class based on ToolStripComboBox should block all keys except digits and
backspace. On Windows using MS .NET 2.0 it works fine. On Mono 2.4 Handled is
not considered. See attached code. Simply enter some text in the zoom combo
box. 

protected override void OnKeyPress(KeyPressEventArgs e)
        {
            if (char.IsDigit(e.KeyChar))
            {
                e.Handled = false;
            }
            else
            {
                if (e.KeyChar == '\b') //Back space
                    e.Handled = false;
                else
                    e.Handled = true;
            }

            base.OnKeyPress(e);
        }

Reproducible: Always

Steps to Reproduce:
1. Go to zoom combo box
2. Type something inside --> it is possible to write letters. 
3.
Actual Results:  
It could be possible to type anything. Handled is not considered.

Expected Results:  
Only digits and backspace should be enabled.

-- 
Configure bugmail: http://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