By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,034 Members | 1,714 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,034 IT Pros & Developers. It's quick & easy.

Disable double click expand and contract treeview

P: 64
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
Aug 13 '07 #1
Share this Question
Share on Google+
2 Replies


FishVal
Expert 2.5K+
P: 2,653
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.
Expand|Select|Wrap|Line Numbers
  1. With Me![The name of Treeview OLE Control].Object.SelectedItem
  2.        .Expanded = Not .Expanded
  3. End With
  4.  
Aug 13 '07 #2

P: 64
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.
Expand|Select|Wrap|Line Numbers
  1. With Me![The name of Treeview OLE Control].Object.SelectedItem
  2.        .Expanded = Not .Expanded
  3. End With
  4.  
Thanks friend,

It works,
Aug 13 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.