Results 1 to 2 of 2

Thread: Treeview control question

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 1999
    Posts
    81

    Post

    What i want to do is click on the the parent make it bold then make all the children under it bold also..

    Any help would be appricated.

    Thanks
    Brooke.

  2. #2
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744

    Post

    If you have VB6, then it is very easy to do:

    Code:
    Private Sub TreeView1_NodeClick(ByVal Node As MSComctlLib.Node)
        Dim iIndex As Integer
        
        Node.Bold = True
        If Node.Children Then
            iIndex = Node.Child.FirstSibling.Index
            Do While iIndex <= Node.Child.LastSibling.Index
                TreeView1.Nodes(iIndex).Bold = True
                iIndex = iIndex + 1
            Loop
        End If
    End Sub
    If you have VB5 and earlier then Join the Club Again

    ------------------

    Serge

    Senior Programmer Analyst
    [email protected]
    [email protected]
    ICQ#: 51055819


    [This message has been edited by Serge (edited 02-22-2000).]

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