using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace UseTreeview
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
TreeNode tnode = new TreeNode("MCA");
tnode.Nodes.Add("Subject");
treeViewsub.Nodes.Add(tnode);
TreeNode fsub = new TreeNode("C#");
TreeNode secsub = new TreeNode("C++");
TreeNode thsub = new TreeNode("Java");
TreeNode[] lansub = new TreeNode[] {fsub, secsub, thsub };
TreeNode Languages = new TreeNode("Language", lansub);
treeViewsub.Nodes.Add(Languages);
}
}
}
Comments
Post a Comment