Programacion de Vista de Arbol Distribucion Geopolitica El Salvador
Programacion de Vista de Arbol Distribucion Geopolitica El Salvador
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
namespace App_TreeView
{
/// <summary>
/// Summary description for Form1.
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.TreeView treeView1;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
ImageList il = new ImageList();
public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
}
#endregion
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
// Creacion de la Raiz
TreeNode rootNode = treeView1.Nodes.Add("EL SALVADOR");
rootNode.ImageIndex =0 ;
child = states4.Nodes.Add("USULUTAN");
child.ImageIndex = 2 ;
child =states4.Nodes.Add("SAN MIGUEL");
child.ImageIndex = 2 ;
child =states4.Nodes.Add("MORAZAN");
child.ImageIndex = 2 ;
child = states4.Nodes.Add("LA UNION");
child.ImageIndex = 2;
}
}
}