[Mono-winforms-list] Treeview

Peter Dennis Bartok peter at novonyx.com
Tue Aug 2 17:28:39 EDT 2005

Tsk, tsk, Paul, you're making rookie mistakes :-)

How about not naming your class the same as the SWF.TreeView class? In 
addition, if that were fixed you'd still have a typo, Node instead of Nodes.

This would work:

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

class TV : Form
  public TV()
    TreeView tv = new TreeView();
    TreeNode root = new TreeNode("Fish");
    TreeNode cart = new TreeNode("Sharks & Rays");
    TreeNode bony = new TreeNode("Bony fishes");
    tv.AfterSelect += new TreeViewEventHandler(AfterSelectHandler);

  public void AfterSelectHandler(object src, TreeViewEventArgs ea)
    TreeNode sel = ((TreeView)src).SelectedNode;

  public static void Main()
    Application.Run(new TV());

----- Original Message ----- 
From: "Paul" <paul at all-the-johnsons.co.uk>
To: "winforms" <mono-winforms-list at lists.ximian.com>
Sent: 02 August, 2005 15:12
Subject: [Mono-winforms-list] Treeview

> _______________________________________________
> Mono-winforms-list maillist  -  Mono-winforms-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-winforms-list

More information about the Mono-winforms-list mailing list