Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ContextMenu for treeview node
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
ContextMenu for treeview node
Divers
Thread ID:
01071675
Message ID:
01071675
Vues:
53
I have a treeview with my own custom treeviewnode class. The treeviewnode class keeps track of several things (like what type the node is). I want to display a different context menu when I right-click on node type #1 than when I right-click node type #2 and for another node type I might not even want the context menu to appear when I right-click.

I've got a feeling that I need to use the mousedown and mouseup events in conjunction with the GetNodeAt() method to determine what node was right clicked and then display (or not) the context menu based on that.

Does this seem to be the right approach? Should I create the context menus in the designer or in code? How do I display a context menu from a right-click event (without just adding the contextmenu in the property sheet)?

This seems like fun.
Semper ubi sub ubi.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform