[Mono-bugs] [Bug 338399] ListView: ArgumentOutOfRangeException in OpenFileDialog

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Nov 1 18:22:42 EDT 2007


https://bugzilla.novell.com/show_bug.cgi?id=338399#c2


George Giolfan <georgegiolfan at yahoo.com> changed:

           What    |Removed                                         |Added
----------------------------------------------------------------------------
                 CC|                                                |georgegiolfan at yahoo.com




--- Comment #2 from George Giolfan <georgegiolfan at yahoo.com>  2007-11-01 16:22:41 MST ---
Here is a reproduction that does not involve FileDialog:
Run the following.

using System;
using System.Diagnostics;
using System.Windows.Forms;

static class Test
{
        [STAThread]
        static void Main ()
        {
                Application.Run (new TestForm ());
        }
}

class TestForm : Form
{
        public TestForm ()
        {
                Button add_item_button = new Button ();
                add_item_button.Text = "Add item";
                add_item_button.Dock = DockStyle.Top;
                Controls.Add (add_item_button);

                TestListView list_view = new TestListView ();
                list_view.MultiSelect = false;
                list_view.LabelEdit = true;
                list_view.Columns.Add ("Test");
                list_view.Items.Add ("1");
                list_view.View = View.Details;
                list_view.Dock = DockStyle.Fill;
                Controls.Add (list_view);
                list_view.BringToFront ();

                add_item_button.Click += delegate (object sender, EventArgs e)
                {
                        list_view.Items.Add ("2");
                };

                list_view.BeforeLabelEdit += delegate (object sender,
LabelEditEventArgs e)
                {
                        Debug.Assert (e.Item != -1);
                };
        }

        class TestListView : ListView
        {
                protected override void OnDoubleClick (EventArgs e)
                {
                        base.OnDoubleClick (e);
                        Items.Clear ();
                }
        }
}

Double click the "1" item.
Click "Add item".
Click in the empty area of the ListView.


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