Home

SpeakComputers.com | Text-to-Speech Software

Natural sounding TTS voice support | Cepstral TTS voices | Text to MP3 | Natural Readers

Text to Speech Software Text to Speech Voices SpeakComputer Text to Speech Software

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.
Top of page
Text to Speech Speech synthesis Software TTS Software
Copy Right 2006 SpeakComputers.com - All Rights Reserved.
About Privacy Policy TTS Resouces
Free Text to Speech software
Free Text to Speech Software