CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2004
    Posts
    1,361

    TreeView: How do you get only some nodes to have check boxes.

    I want a treeview where only the outer-most leaves have checkboxes. I can only make everything or nothing have checkboxes.

    I think Ill have to inherit from TreeView and make my own class, but I really have no idea what I am supposed to override to get it to dynamically switch on checkboxes as needed. Any suggestions?

  2. #2
    Join Date
    Feb 2008
    Posts
    79

    Re: TreeView: How do you get only some nodes to have check boxes.

    It has been a while since I have done this
    But you basically have to give the list an imagelist with three images 'blank' 'unchecked' and 'checked' then tell the items you dont want to have a checkbox to use the image 'blank'

    If you do this, you will have to track the checked state of the items on your own... and set the correct image based on the state.
    Cheers,
    Jon

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

Featured