Results 1 to 2 of 2

Thread: Uncheck Node in TreeView

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2000
    Location
    Los Angeles
    Posts
    2

    Exclamation

    Sup all.
    I been trying to uncheck a node programatically but no luck
    does any one know how 2 do this.
    sounds simple enough( The "Node.Checked = False" doesnt seem to do the trick)
    I want the user to be able to check only 2 nodes at a time but if they check more than 2 then the last one i want it to uncheck it.
    thanks in advance.
    THIS IS WHAT I HAVE SO FAR:

    Private Sub tvProviders_NodeCheck(ByVal Node As MSComctlLib.Node)
    DIM iNodesChecked as integer

    ----Node.Selected = True
    -
    ----If Node.Checked = True Then
    -------iNodesChecked = iNodesChecked + 1
    ----ElseIf Node.Checked = False Then
    -------iNodesChecked = iNodesChecked - 1
    ----End If
    -
    ----If iNodesChecked > 2 And Node.Checked = True Then
    -------Node.Checked = False
    -------DoEvents
    ----End If
    -
    ----lblChecked.Caption = iNodesChecked
    -
    End Sub
    ~Mr Shadie~
    Los Angeles, CA
    Data Systems Analyst

  2. #2
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527
    Code:
    tv1.Nodes(1).Checked = False
    but i cannot get it to work inside the treeview_nodecheck function

    i don't know why

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