Solved

select an item in a tree view control

Posted on 2004-04-22
3
261 Views
Last Modified: 2013-12-26
Hi!!
Supposing the next tree
A
└--B
    └--C
    └--D
└--E
    └--F
        └--G
└--H
    └--I

Every item in the tree is associated with a number saved in data in the moment to create every item. In this example:
A has associated 1 in data
B - 2
C - 3
   .
   .
   .
I - 9

How to make than giving the number of the data of an item to expand all the tree, because the tree is all collapsed, and then select and highlight the item with the given number?

For your help, thank you very much!!
0
Comment
Question by:tsirakua
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 

Author Comment

by:tsirakua
ID: 10894879
I think the tree is not good viewed for the special characters.
Here is again:
A
   B
      C
      D
   E
      F
         G
   H
      I
 
 I hope you understand, thank you
0
 
LVL 2

Accepted Solution

by:
bluecomet earned 250 total points
ID: 11049540
To expand all the treeview:

long ll_tvi

ll_tvi = tv.FindItem(RootTreeItem! , 0)

tv.ExpandAll(ll_tvi)

or

you must search the item which you will expand when give a number,

search the item (must search through all the tv), save the handle of the found item (use finditem) and then expand the item (tv.expand(handle))
0
 

Author Comment

by:tsirakua
ID: 11937580
I didn't probe it but thanks for your interest
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In our object-oriented world the class is a minimal unit, a brick for constructing our applications. It is an abstraction and we know well how to use it. In well-designed software we are not usually interested in knowing how objects look in memory. …
Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.
Suggested Courses

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question