Disable double click expand and contract treeview

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ykhamitkar
    New Member
    • May 2007
    • 64

    Disable double click expand and contract treeview

    Hi there,

    I have an ms access form and have used treeview within it.
    When somebody double clicks on the node it opens a separete window for the information of that Node. But due to default setting treeview automatically Expands ot Contracts for that that node.

    What I want to do is once double click it should show the new form but should not Expand or contract the node.

    Please help,
    thanks
  • FishVal
    Recognized Expert Specialist
    • Jun 2007
    • 2656

    #2
    Originally posted by ykhamitkar
    Hi there,

    I have an ms access form and have used treeview within it.
    When somebody double clicks on the node it opens a separete window for the information of that Node. But due to default setting treeview automatically Expands ot Contracts for that that node.

    What I want to do is once double click it should show the new form but should not Expand or contract the node.

    Please help,
    thanks
    Hi there.

    You can try to force expanded node to collapse back (and vice versa) by setting Node.Expanded property to opposite value in DblClick event handler. Smthng like this.
    Code:
    With Me![The name of Treeview OLE Control].Object.SelectedItem
           .Expanded = Not .Expanded
    End With

    Comment

    • ykhamitkar
      New Member
      • May 2007
      • 64

      #3
      Originally posted by FishVal
      Hi there.

      You can try to force expanded node to collapse back (and vice versa) by setting Node.Expanded property to opposite value in DblClick event handler. Smthng like this.
      Code:
      With Me![The name of Treeview OLE Control].Object.SelectedItem
             .Expanded = Not .Expanded
      End With
      Thanks friend,

      It works,

      Comment

      Working...