Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Treeview RightClick
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00691817
Message ID:
00691899
Vues:
30
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform