using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace Dr123
{
public partial class Form2 : Form
{
public Form2()
{
InitializeComponent();
}
private void
Form2_Load(object sender, EventArgs e)
{
treeView1.Nodes.Add("DotNet");
treeView1.Nodes[0].Nodes.Add("C#.Net");
treeView1.Nodes[0].Nodes.Add("ASP.Net");
treeView1.Nodes[0].Nodes[0].Nodes.Add("Console
Applications");
treeView1.Nodes[0].Nodes[0].Nodes.Add("Windows
Forms Applications");
treeView1.Nodes[0].Nodes[0].Nodes[1].Nodes.Add("ADO.Net");
treeView1.Nodes[0].Nodes[0].Nodes[1].Nodes.Add("WCF");
treeView1.Nodes[0].Nodes[1].Nodes.Add("Html");
treeView1.Nodes[0].Nodes[1].Nodes.Add("JavaScript");
treeView1.Nodes[0].Nodes[1].Nodes.Add("Asp.Net
Controls");
treeView1.Nodes[0].Nodes[1].Nodes[0].Nodes.Add("Css");
}
private void
button1_Click(object sender, EventArgs e)
{
treeView1.Nodes.Remove(treeView1.SelectedNode);
}
}
}
1 comment:
Using TreeView control in Windows Forms
Post a Comment