|
-
May 2nd, 2001, 10:24 PM
#1
How to make a plus sign before the children of a tree?
As far as I know, in TreeView control, if any of the leaf of the tree has no child, then
there will no be a 'plus' sign befor the line. But I have a problem. Before the user click
the plus sign, I will not query the children leaf of the present one. so I need the plus
before the user click it (if after user's click there's no children, then the plus will disappear)
You know, if I query all of the tree, it will cost me a very long time to build the tree ).
So I have to query it when the user need it.
I try to find some settings on the Treeview control , but failed. Any one can give me some hints?
//-----------------------------------------\\
Where there's a wire , there's a way
\\-----------------------------------------//
-
May 3rd, 2001, 02:44 AM
#2
Re: How to make a plus sign before the children of a tree?
For every node you add, you add a dummy node. This will make the treeview show a plus sign. Then when the user clicks the plus sign (use the expand event of the treeview) remove the dummy, and add the real ones (if any).
Tom Cannaerts
[email protected]
Programming today is a race between software engineers striving to build bigger and better idot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|