|
|
|
|
Using Visual Studio |
The control is automatically added to your Toolbox in Visual Studio and is automatically registered in the GAC (Global Assembly Cache) during installation of SftTree/NET. Please see Distributing SftTree/NET for information on how to distribute the control with your application.
You can add a SftTree control to a form by dragging it from the Toolbox to the form.
Controls are automatically added to Visual Studio's Toolbox, except for Express Editions of Visual Studio. For details about manually adding the controls to the Toolbox when using Express Editions of Visual Studio, please see the description located in your Windows Start Menu > All Programs > SftTree NET 2.0 > Maintenance > Toolbox.
Once the control has been added to the form, you can access its property pages, product updates and product support page on the web.
In this example, we'll create a minimal tree control with just a few items.
VB
Imports Softelvdm.SftTreeNET Imports Softelvdm.Controls Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim item As ItemClass item = SftTree1.ItemCollection.Add("First") item.Add("A Child Item") item.Add("Another Child Item") SftTree1.ItemCollection.Add("Second") SftTree1.ItemCollection.Add("Third") End Sub End Class
C#
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using Softelvdm.SftTreeNET; using Softelvdm.Controls; namespace WindowsApplication1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { ItemClass item = sftTree1.ItemCollection.Add("First"); item.Add("A Child Item"); item.Add("Another Child Item"); sftTree1.ItemCollection.Add("Second"); sftTree1.ItemCollection.Add("Third"); } } }
This control has many properties and methods which you can use. This is a very simple example and doesn't even begin to exploit the capabilities of this control. Please take a moment to familiarize yourself with the classes and objects offered by the SftTree/NET control. Each class or object represents a specific area of the control and can be fully customized. Also make sure to run the demo which is included with this product and take a look at the included samples.