[Mono-bugs] [Bug 502443] Treeview, select first node by default

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon May 11 00:15:22 EDT 2009


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

User calberto.cortez at gmail.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=502443#c1


Carlos Alberto Cortez <calberto.cortez at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |calberto.cortez at gmail.com




--- Comment #1 from Carlos Alberto Cortez <calberto.cortez at gmail.com>  2009-05-10 22:15:21 MDT ---
In trunk it's running fine, having the first node in the Nodes collection
selected. Take the next sample:

using System;
using System.Drawing;
using System.Windows.Forms;

public class TestForm : Form
{
    public static void Main ()
    {
        TestForm form = new TestForm ();
        Console.WriteLine ("-- ABOUT TO RUN --");
        Application.Run (form);
    }

    public TestForm ()
    {
        tv = new TreeView ();
        tv.AfterSelect += delegate { Console.WriteLine ("AfterSelect"); };
        tv.BeforeSelect += delegate { Console.WriteLine ("BeforeSelect"); };
        tv.Dock = DockStyle.Fill;
        tv.Parent = this;
        tv.Nodes.Add ("One");
        tv.Nodes.Add ("Two");
    }

    TreeView tv;
}

You will see that in Mono you will the BeforeSelect/AfterSelect events when the
form is shown, and the item 'One' is selected.

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