Click to See Complete Forum and Search --> : TreeView Checked Property?!?!


WarWolf
August 6th, 2001, 07:32 AM
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

WarWolf
August 6th, 2001, 07:55 AM
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*