Results 1 to 5 of 5

Thread: TreeView with columns

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2003
    Posts
    14

    TreeView with columns

    For a project I am currently working on I need the collapse/expand functionality of the TreeView but with columns (like the listview).

    Is there any solutions to this or do I need an entirely new control?

  2. #2
    old fart Frans C's Avatar
    Join Date
    Oct 1999
    Location
    the Netherlands
    Posts
    2,926
    It is possible to use listview for that, but the code is not so simple.
    See Brad Martinez's sample , and look for LVItemTree: How to create a hierarchical ListView
    Frans

  3. #3

    Thread Starter
    New Member
    Join Date
    Mar 2003
    Posts
    14
    Thanks. Looks just what I need.

    One more question. It would really be great if I could have icons in a couple of columns. Does this require a lot of changes to this code?

  4. #4
    old fart Frans C's Avatar
    Join Date
    Oct 1999
    Location
    the Netherlands
    Posts
    2,926
    Do you want icons IN the columns? Not just in front of the columns?
    I wouldn't know how to do that. I guess it requires the listview to be custom drawn, but I am not sure about that.
    Frans

  5. #5

    Thread Starter
    New Member
    Join Date
    Mar 2003
    Posts
    14

    Unhappy

    Yes, the control I need would have to look something like this.

    Column(1) : Icon and text in treeview style (as in the LVItemTree)
    Column(2) : Icon
    Column(3) : Icon
    Column(4) : Text
    Column(5) : Text
    ...

    The vbAccelerator S-Grid Control can have icons in the columns. The LVItemTree has the treeview ability in the rows. I guess the problem is now finding the part with regard to the icons in the S-Grid and translating it to the LVItemTree. Anybody who can help me on this issue?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width