Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 69
Default Treeview with context menus

Trying to make a form with a TreeView control and context menus. So rather than having buttons for the typical Add, Edit and Remove commands, I'd like to do everything in context menus. Problem #1 is I can't find context menu controls (or any menus!) among Additional Controls in VBA. Problem #2 is that I can't find out how to catch a right mouse click in the TreeView.

Shall I resort to using the TreeView for selecting nodes only and use buttons for the Add, Edit and Remove commands?

Gustaf
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,049
Default Treeview with context menus

you can use the mousedown event to check which button was pressed ...


Private Sub TreeView1_MouseDown(ByVal Button As Integer, ByVal Shift As
Integer, ByVal x As stdole.OLE_XPOS_PIXELS, ByVal y As
stdole.OLE_YPOS_PIXELS)

MsgBox "button " & Button

End Sub

"Gustaf" wrote in message
...
Trying to make a form with a TreeView control and context menus. So rather
than having buttons for the typical Add, Edit and Remove commands, I'd
like to do everything in context menus. Problem #1 is I can't find context
menu controls (or any menus!) among Additional Controls in VBA. Problem #2
is that I can't find out how to catch a right mouse click in the TreeView.

Shall I resort to using the TreeView for selecting nodes only and use
buttons for the Add, Edit and Remove commands?

Gustaf


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sub-menus of main menus for Excel 2007 Eleanor Peppard New Users to Excel 1 March 16th 10 04:12 PM
adding to Context Menus in Excel 2007 hickymanz Excel Programming 7 September 2nd 08 09:14 AM
Accessing the excel 2007 context menus... Jimm Excel Programming 2 June 26th 08 02:04 PM
[Excel '03] check-box menu items and cell context menus don't disp Jack Hoxley [MVP] Excel Programming 5 May 2nd 08 05:08 PM
Overriding Actions of Excel DropDown Menus and Poup Menus Von Shean Excel Programming 2 February 3rd 04 06:43 AM


All times are GMT +1. The time now is 09:04 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"