Treeview node check bug. 
Author Message
 Treeview node check bug.


I'm setting the checked property of nodes in my treeview via the
following -

Public Sub LoadMyWhoCheckBoxes()
    Dim aRs As Recordset
    Dim aKey As String

    Set aRs = getQuery("qryMyWHO-EVERYTHING")
    Do Until aRs.EOF
        aKey = "L" & Format(aRs!Location) & "|" & Format(aRs!id)
        Me.tree.Nodes.Item(aKey).Checked = aRs!Status
    CloseDB aRs
End Sub

I found that the nodes were not reliably staying checked.  Placing a
watch on the checked property of one of the nodes that should have
been checked, I found that it was (sometimes) being checked correctly
here -

        Me.tree.Nodes.Item(aKey).Checked = aRs!Status

and then being unchecked immediately the next line!

So, I go to the MSDN and look for "treeview checked bug" and find
article "Q192188 - BUG: TreeView Problems with CheckBoxes" and think
it solves my problem.

Unfortunately it doesn't. And the "fix" seems to make no difference at
all.  What I've found is that if I set the style of the treeview to
any style that contains an icon, ie tvwPictureText,
tvwTreelinesPlusMinusPictureText (which is the one I want to use) etc,
the nodes will not be checked reliably.  Without the icon, they work

This is somewhat frustrating as whilst my app doesn't *need* the
icons, I've got attached to them and they add a bit of colour.

Has anyone else had this problem and did you overcome it and how?

Wed, 18 Jun 1902 08:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Treeview 6.0 Node Tip Bug

2. BUG:Treeview.Nodes.Clear method very slow with ComCtl32.DLL version 4.71.17123

3. Treeview selects node before events fire (Bug?)

4. Treeview Control Node Tooltips Bug in NT

5. TreeView Checked Node?

6. Traversing TreeView, but only checked nodes?

7. TreeView node checking

8. TreeView Nodes.Checked

9. Treeview.node().checked property

10. TreeView Control - Checked property of Node not working

11. Treeview check if node exists

12. Preventing Nodes from being checked in the Treeview Control


Powered by phpBB® Forum Software