CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2000
    Location
    Tampico, Tam. Mexico
    Posts
    3

    Hide nodes in TreeView

    How can I hide some nodes in a TreeView???

    -----> JAFET

  2. #2
    Join Date
    Jan 2000
    Location
    MO, USA
    Posts
    1,506

    Re: Hide nodes in TreeView

    Isn't there a .visible property you can use?

    John Pirkey
    MCSD
    www.ShallowWaterSystems.com
    John Pirkey
    MCSD (VB6)
    http://www.stlvbug.org

  3. #3
    Join Date
    Feb 2000
    Location
    Tampico, Tam. Mexico
    Posts
    3

    Re: Hide nodes in TreeView

    Yes.. but It's Read Only...

    I try it and VB send me:

    Error '383' At Runtime
    Read Only Property

    -----> JAFET

  4. #4
    Join Date
    May 1999
    Location
    Oxford UK
    Posts
    1,459

    Re: Hide nodes in TreeView

    You can't do this with the standard TreeView control that comes with VB5 / VB6. You'd have to get into some low-level subclassing to handle the custom-drawing of the nodes (ignoring the ones you want to hide).

    It's a lot of work - I posted some code to the CG site over a year ago that handled painting each node a different colour (for VB5 - I know you can do it now with VB6)

    Can't you just choose not to add those nodes to the tree ? or simply remove the ones from the tree you don't want shown and add them in when required ?

    Chris Eastwood

    CodeGuru - the website for developers
    http://codeguru.developer.com/vb

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