Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Vb.Net TreeView ListView problem

  • 30-04-2012 12:31PM
    #1
    Closed Accounts Posts: 185 ✭✭


    Hey,

    I have split container with a TreeView on the left hand side. (Panel 1)
    When the user clicks on File->Add, they're prompted for computer name.
    Once they hit OK, the following node with children is added.
    - Machine Name
      + System
        - Processor
        - Operating System
        - BIOS
      - Process
      - Applications
      + Users and Groups
        - Users
        - Groups
        - Profiles
      - Printers
      - Network
      - Services
    

    Machine is a class itself and each child node also represents a class.

    When the user clicks on a node, information is displayed in Panel 2 of split container.

    Depending on the node selected, i hide or show a ListView control containing information.

    This is fine for one machine but I'm unsure how to work with multiple machines...

    Is there some way to bind a ListView to information in a class or do i need to create separate ListView controls for each machine added?


Comments

  • Registered Users, Registered Users 2 Posts: 419 ✭✭Mort5000


    When you say multiple machines, do you mean they can select multiple nodes at the same time?


  • Closed Accounts Posts: 185 ✭✭superluck


    The user can select just 1 machine at a time in the treeview control.
    Each machine is class with information about process, services, users and other system info.

    I think i might have a solution to what i want.
    Started with a Form first but a UserControl seems better...

    For each machine, I create a Panel and in that panel goes all the other controls associated with each part of the computer.

    Each node has a tag and the tag points to a Control object so i toggle these on/off using the BringToFront() method.

    I'll post some code later to demonstrate what I would like to do because I feel there's probably better way to write it than what i currently have.


Advertisement