Preventing a User from selecting a TreeView Node
I have a TreeView that I am using for display purposes only. I don't want the user to be able to select any of the nodes. Setting the enabled property of the form to False doesn't suffice since it changes the entire look of the nodes.
I tried canceling the select action in the BeforeExpand event. It kind of works. It selects, then de-selects the item. I'm going to play around with other events to see what I can come up with, but would appreciate any information.
Thanks
Re: Preventing a User from selecting a TreeView Node
Presumably the BeforeSelect event would be the way to go rather than BeforeExpand.
Re: Preventing a User from selecting a TreeView Node
Quote:
Originally Posted by
jmcilhinney
Presumably the BeforeSelect event would be the way to go rather than BeforeExpand.
BeforeSelect is the event I'm using. I'm not sure why I typed BeforeExpand :P