471,321 Members | 1,662 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,321 software developers and data experts.

TreeView + ListView = ???

Hi all,

I have a need to display a message list in the same way as Outlook
Express/Thunderbird displays new posts (and probably most other newsreaders,
like the one you're using now!). I know there are commercial options but a)
I don't want to pay and b) they're all massively bloated. I want exactly a
TreeList + ListView, and I want it to be kilobytes, not megabytes! :)

I originally wrote one from scratch in .net 1.1, which had a few bugs with
scrolling, but worked for the most part. I've mis-placed it - which is
probably a good thing, since the code was probably carp!

So, it's time to do it again! I was after some opinions, as I have a few

1. Write it all from scratch
2. Write a control that includes both a TreeView and a ListView, and somehow
mash them together
3. Extend ListView and add expand/collapse etc.
4. Extend TreeView and add columns

I thought 3 or 4 would be the best method...

Originally, I thought I'd use 4, since I get the "tree" side from scratch.
With a ListView, I'd have a hard time keeping track of where to start
rendering when the scrollbar is at y (since the messages that have been
scrolled off may be expanded or collapsed!). However, I can't figure out how
to add column headers (I can custom draw nodes, but that's it - no way to
insert headers, without including the tree in another control, and then the
user can't directly set the treelist normal properties). The resizing etc.
of columns would also not be trivial.

However, if I start with a ListView, I've got the whole problem of the data
being flat, and my messages are in a tree format, so I've got to dyamically
hide/show rows based on the parent being expanded/collapsed.

Any opinions on which of these would cause the least number of headaches?

Nov 28 '05 #1
0 1741

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by alan | last post: by
6 posts views Thread by Beginner | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.