Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Treeview RightClick
Message
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00691817
Message ID:
00691899
Views:
33
Anyone have an example of how RightClick might be implemented on treeview6?

This code in the TreeView's MouseDown():
LOCAL loNode

*** if we have a shortcut menu associated
*** with this treeview, show it if we right-clicked
*** But only show it if we have actually right-clicked
*** on a node, if we right-click on the '-' or '+' in front
*** of a node, there is not way to select it
IF Button = 2 AND NOT EMPTY( This.cMenu )

  *** Get a reference to the node under the mouse
  *** nFactorX and nFactorY are used to convert pixels to twips
  loNode = This.HitTest( X * This.nFactorX, Y * This.nFactorY )

  *** If we have a valid node, show the menu.
  IF NOT ISNULL( loNode ) 
    This.ShowMenu()
  ENDIF
ENDIF
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform