|
-
Jun 16th, 2005, 11:35 AM
#1
Thread Starter
Need-a-life Member
TreeView Cancel Expand/Collapse
Is there anyway to avoid a node to be collapsed or expanded when doubled-click. I know I can expand and/or collapse the node in the DoubleClick event... but I don't wan't the user to see the expand and collapse -or collapse and expand regarding it's initial status). TIA,
Emiliano F. Martín
If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
Encourage the person who helped you to keep doing it, and give him the points he deserves.
MP3 Organizer: Freeware to logically organize all your MP3s.
-
Jun 16th, 2005, 11:48 AM
#2
Re: TreeView Cancel Expand/Collapse
I guess maybe you count mouseclicks in the MouseDown events and trap the BeforeExpand/Collapse events (Ithink that's what they're called) to cancel the expand/collapse and reset the mouseclick counter. Also you would need some sort of timer to reset the mouseclick counter as well. Seems a bit of a crude hack though, must be a better way of doing it.
-
Jun 16th, 2005, 11:50 AM
#3
Re: TreeView Cancel Expand/Collapse
Also maybe something on this page might help you.
-
Jun 16th, 2005, 11:52 AM
#4
Thread Starter
Need-a-life Member
Re: TreeView Cancel Expand/Collapse
 Originally Posted by penagate
I guess maybe you count mouseclicks in the MouseDown events and trap the BeforeExpand/Collapse events (Ithink that's what they're called) to cancel the expand/collapse and reset the mouseclick counter. Also you would need some sort of timer to reset the mouseclick counter as well. Seems a bit of a crude hack though, must be a better way of doing it.
I only found these events on .Net. Does VB6 also have them?
Emiliano F. Martín
If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
Encourage the person who helped you to keep doing it, and give him the points he deserves.
MP3 Organizer: Freeware to logically organize all your MP3s.
-
Jun 16th, 2005, 11:55 AM
#5
Re: TreeView Cancel Expand/Collapse
 Originally Posted by Mc Brain
I only found these events on .Net. Does VB6 also have them?
Yes I just looked them up, they are called Expand and Collapse
-
Jun 16th, 2005, 12:09 PM
#6
Thread Starter
Need-a-life Member
Re: TreeView Cancel Expand/Collapse
 Originally Posted by penagate
Also maybe something on this page might help you.
Ok, I might not explain myself correctly. I want to cancel the expand/collapse if the user double-clicks only. That example avoids to expand/collapse even with the "+" and "-".
Emiliano F. Martín
If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
Encourage the person who helped you to keep doing it, and give him the points he deserves.
MP3 Organizer: Freeware to logically organize all your MP3s.
-
Jun 16th, 2005, 01:23 PM
#7
Thread Starter
Need-a-life Member
Re: TreeView Cancel Expand/Collapse
 Originally Posted by penagate
Yes I just looked them up, they are called Expand and Collapse 
Yes, but those events fires after the action itself. So, when I get to this point... the node has already been expanded or collapsed. I know I can collapse it or expand it but this is the flickering I want to avoid.
Emiliano F. Martín
If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
Encourage the person who helped you to keep doing it, and give him the points he deserves.
MP3 Organizer: Freeware to logically organize all your MP3s.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|