 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
NoName Guest
|
Posted: Wed Jan 28, 2004 10:42 am Post subject: TreeView and DblClick event |
|
|
Hello,
I use Delphi 6.
I have a form and a TreeView component on it.
At run-time, when user double-clicks (left mouse button) over the text of an
item with children, the TreeView component automatically expands the clicked
node, and *THEN* triggers the OnDblClick event.
Is there a way to prevent the expanding behaviour when user double-clicks
over an item?
I just want it only when the user clicks on the [+] sign.
Properties of my TreeView object:
- AutoExpand = false
- MultiSelect = false
- RightClickSelect = false
- RowSelect = false
Thank you
Regards
|
|
| Back to top |
|
 |
NoName Guest
|
Posted: Wed Jan 28, 2004 11:20 am Post subject: Re: TreeView and DblClick event |
|
|
....I found the solution by myself
I post it here, so if it would help...
I used GetHitTestInfoAt(x,y) function to determine what user clicked.
then, in the OnExpanding event, i made my test, setting AllowExpanding
variable to false to prevent expanding.
And in the OnDblClick event I wrote the rest.
Regards
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|