Context menu for treeview

G

Guest

I wonder how to display a context menu in a treeview control since this
control does not have the ShortcutMenuBar property. I know there was a API
based method to display context menus in Access 2.
Thanks and regards, Norbert
 
G

Graham R Seach

Norbert,

Private Sub tvw_MouseDown(ByVal Button As Integer, ByVal Shift As Integer,
ByVal x As Long, ByVal y As Long)
If Button = acRightButton Then
CommandBars("MyCustomMenu").ShowPopup
End If
End Sub

Regards,
Graham R Seach
Microsoft Access MVP
Canberra, Australia
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top