CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2001
    Location
    Sweden
    Posts
    11

    TreeView Checked Property?!?!

    Hmm got a problem with the treeview control
    the thing is that i have this tree that have the checkboxes property set to true at designtime but when i try to set a nodes checked property to true nothing happends???

    I have also tried to set the bold property to true and that works fine...

    The code:

    private Sub FillTree(Conn as Connection, tv as TreeView)
    Dim rsServer as Recordset
    Dim rsGroup as Recordset

    Dim ServerNode as Node
    Dim ChildNode as Node

    set rsServer = Conn.Execute("Select * From [Server] Order By ServerName")
    Do Until rsServer.EOF
    set ServerNode = tv.Nodes.Add(, , , rsServer!ServerName, "Server", "Server")
    set rsGroup = Conn.Execute("Select * From [Group] Where ServerID=" & rsServer!ServerID & " Order By GroupName")
    Do Until rsGroup.EOF
    set ChildNode = tv.Nodes.Add(ServerNode, tvwChild, , rsGroup!GroupName, "Group", "Group")
    ChildNode.Checked = rsGroup!Subscribed
    ChildNode.Bold = rsGroup!Subscribed
    rsGroup.MoveNext
    Loop
    rsServer.MoveNext
    Loop
    End Sub





  2. #2
    Join Date
    Jun 2001
    Location
    Sweden
    Posts
    11

    Re: TreeView Checked Property?!?!

    Looks like i found the problem.
    Im calling the checked proprty form form_main
    and it looks like it doesent work.
    strange thing that all the other propertys was working *SIGH*


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