|
-
Mar 23rd, 2000, 05:54 AM
#1
Thread Starter
Lively Member
Treeview - enhanced?
I want to display data using the hierarchical structure of a treeview, but with the tabular format of one of the grid controls:
Example:
root
<TAB>category
<TAB><TAB>subcategory
<TAB><TAB><TAB>item<TAB>description quantity other data
<TAB><TAB><TAB>item<TAB>description quantity other data
<TAB>category
<TAB><TAB>item<TAB><TAB>description quantity other data
<TAB><TAB>item<TAB><TAB>description quantity other data
<TAB>category
<TAB><TAB>subcategory
<TAB><TAB><TAB>item<TAB>description quantity other data
where root, category, subcategory and item appear in the treeview. A category may or may not have a subcategory. If there is no subcategory then the items appear directly under the main category.
I can build the tree with no problem. My problem arises when I try to display the associated data with each item.
It is easy to build a tree text string for each item by concatenating the data fields but the data will not then line up making it difficult to read.
I could use a fixed pitch font such as Courier, and add in extra spaces if the line has no subcategory, but courier looks so crappy these days compared with some of the quality fonts that you get now. Perhaps there is a decent fixed pitch font that I don't know about?
I have thought about putting a grid alongside the treeview but this method is riddled with problems.
Does anyone have any suggestions on how to achieve my required result?
Additional:
When I initially posted this question, all of the spacing that I put into my example to make things line up disappeared!!!
Substitute 4 spaces for <TAB> to see what I really mean!!!
[Edited by Michael on 03-23-2000 at 06:01 PM]
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
|