SpeakComputers.com
Home
Software
Electronics
Desktop Computers
Laptops
Games
Handheld Devices
Mobile Phones
Cameras
Camcorders
Printers
Books
Software Downloads 2012 Software Mac Software Security Student Editions Windows 7 Office 2010
ASP.NET C# VB.NET C++ .NET Infragistics DevComponents

C++ TreeView Control.

The C++ Windows TreeView control is used to display a hierarchical collection or list of items. An example is commonly seen with Windows explorer.

Namespace: System::Windows::Forms
System.Windows.Forms (in system.windows.forms.dll)

Creating an new C++ Windows forms TreeView.
TreeView^ treeview = gcnew TreeView;

Creating the first TreeNode for the TreeView.
TreeNode^ tn1 = gcnew TreeNode;
tn1->Text = "Computers";

Adding the first TreeNode to the TreeView control.
treeview->Nodes->Add(tn1);

Creating TreeNode sub items to add to the first TreeNode.
TreeNode^ tn2 = gcnew TreeNode;
tn2->Text = "DELL";

TreeNode^ tn3 = gcnew TreeNode;
tn3->Text = "HP";

TreeNode^ tn4 = gcnew TreeNode;
tn4->Text = "SONY";

Adding the TreeNode sub items to the first TreeNode.
tn1->Nodes->AddRange(gcnew cli::array<TreeNode^>(3) {tn2, tn3, tn4});

Adding the TreeView Control to the Form.
this->Controls->Add(treeview);

Setting the selected TreeNode.
treeview->HideSelection = false;
treeview->SelectedNode = treeview->Nodes[0]->Nodes[1];

C++ TreeView control Tutorial.
Computer Security
AntiVirus Software
Internet Security
Parental Controls
Backup & Recovery
Computer Protection
Anti Malware
Photo & Video
Photo & Video Editing
Video Music
Desktop Publishing
Professional Design
Home Publishing
Clipart
Business & Accounting
Accounting
Payroll
Check Printing
TAX
H&R Block
Microsoft Office
Design
Graphic Design
Home Design
Garden Design
Interior Design
Computer Aided Design
3D Design
Students & Teacher
Adobe
Microsoft Office
Dragon Naturally Speaking
Corel Draw
Serif
Student/Teacher Software
Copy Right 2006 SpeakComputers.com - All Rights Reserved.
Home About Privacy Policy Resouces