Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Tree View Clicks...
Message
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00124036
Message ID:
00124356
Views:
18
Bob,

>How do you access the events of the tree view when you are using the wrapper class?
>
>For example, I need to know when someone double clicks on a node, even better, when someone double clicks on a child node.
>
>For now I am using (mfr?)nodechange method, but it is not really what I want.

The way to do this is to add the event to the actual TreeView class (for example CTreeView in CActX.prg), then call a method of the parent wrapper class.

I have made the following changes to the Framework, and you can do the same at your site:

1. Add the following code to the class definition for CTreeView in CActX.prg:

FUNCTION DblClick()
This.Parent.DoubleClickHook()
ENDFUNC

2. Add a new method called "DoubleClickHook()" to CTreeViewBaseCtrl.

NOTE: I am not passing a reference the currently selected TreeView control since it's not being passed by MS Treeview to the DblClick() event. However, you can use one of the wrapper class's methods to return a reference for you.

Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Previous
Reply
Map
View

Click here to load this message in the networking platform