[Mono-bugs] [Bug 425049] ListView: EnsureVisible(>=16) IndexOutOfRangeException

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Sep 10 19:58:25 EDT 2008


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

User johnm at hlaustralia.com.au added comment
https://bugzilla.novell.com/show_bug.cgi?id=425049#c3





--- Comment #3 from John Mortlock <johnm at hlaustralia.com.au>  2008-09-10 17:58:25 MDT ---
I am using the 2.0 preview, although i am in the process of compiling the svn
head code.

Yes the problem is due to when the BeginUpdate and the EndUpdate is called.
Changing the example to what is below causes the error to occur.
MS .NET works in this case.


using System;
using System.Windows.Forms;

public class test
{
        static void Main ()
        {
                Form f = new Form ();

                ListView lv = new ListView ();
                lv.BeginUpdate();
                for (int i = 0; i < 20; i++)
                        lv.Items.Add ("Item " + i);
                lv.EnsureVisible (16);
                lv.EndUpdate();

                lv.Parent = f;
                f.Load += delegate { lv.EnsureVisible (16); };

                Application.Run (f);
        }
}


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