LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default Tooltips won't show up in custom popup menu

Tooltips are not displayed for menu items, only for first level controls on
a commandbar/toolbar.

--
Jim
"Brian J. Matuschak" wrote in
message ...
| Greetings:
|
| I've inherited an Excel application that I need to debug. One of the
| remaining things I need to fix is showing tooltips in a custom popup menu.
I
| have "Show ScreenTips on toolbars" enabled under the "Customize" dialog,
but
| it isn't as simple as that. Here are the subs that populate the menus:
|
| ' Calling procedure
| Public Sub PopupMenuAddStaffing()
| Dim cbar As CommandBar
| Dim ctrl As CommandBarControl
| Dim ctrlCut As CommandBarControl
| Dim sx As String
| Dim iReset As Integer
| Dim sTool As String
| Dim idx As Integer
| On Error GoTo eh
| ' ---
| Call goMenu.PopupMenuDeleteStaffing
| Call InsertMainMenuBar
|
| With Application.CommandBars("Cell")
| On Error Resume Next
| ' put a separator bar before the 'Cut' item
| iReset = ResetWorkbookExists()
| If iReset = 0 Then
| .Controls(1).BeginGroup = True ' put a spacer between our menu
| and the existing
| Else
| .Controls(1).BeginGroup = False
| End If
| End With
|
| ' item: SlideCalendar
| sTool = "Delete first 7 days and fill to 90 days"
| MenuItemAdd CAPSLIDECALENDAR, sTool, 2143, "SlideCalendar", 1, False
| MenuSubItemAdd CAPSLIDECALENDAR, sTool, 2143, "SlideCalendar", 1, False
|
| ' item: ResetWorkbook
| sTool = "Reset staff assignments from Events sheet"
| If iReset = 0 Then MenuItemAdd CAPRESETWORKBOOK, sTool, 1709,
| "ResetWorkbook", 1, False
| MenuSubItemAdd CAPRESETWORKBOOK, sTool, 1709, "ResetWorkbook", 1, False
|
| ' item: Print Setup
| sTool = "Setup Print Output Sheet"
| MenuItemAdd CAPPRINT, sTool, 707, "PrintSheet", 1, False
| MenuSubItemAdd CAPPRINT, sTool, 707, "PrintSheet", 1, False
|
| ' item: SortEvents
| sTool = "Sort Event Rows"
| MenuItemAdd CAPSORTEVENTS, sTool, 2170, "SortEvents", 1, False
| MenuSubItemAdd CAPSORTEVENTS, sTool, 2170, "SortEvents", 1, False
|
| ' item: AddEvent locally
| sTool = "Add a new event to this spreadsheet only"
| MenuItemAdd CAPADDEVENTLOC, sTool, 2114, "ManualAddEvent", 1, False
| MenuSubItemAdd CAPADDEVENT, sTool, 2114, "AddEvent", 1, False
|
| ' item: AddEvent
| sTool = "Add a new event to EventCal"
| MenuItemAdd CAPADDEVENT, sTool, 2114, "AddEvent", 1, True
| MenuSubItemAdd CAPADDEVENT, sTool, 2114, "AddEvent", 1, True
|
| ' item: Assignment Sheet
| ' Modified by Brian Matuschak 11/16/05
| sTool = "Assign Resources to Event and use to unhide the Assignment
sheet"
| MenuItemAdd CAPASSIGNSHEET, sTool, 2104, "ShowAssignSheet", 1, False
| MenuSubItemAdd CAPASSIGNSHEET, sTool, 2104, "ShowAssignSheet", 1, False
|
| ' item: Assign resources
| sTool = "Assign Resources to Event"
| MenuItemAdd CAPASSIGNRESOURCES, sTool, 1084, "ShowAssignForm", 1, False
| MenuSubItemAdd CAPASSIGNRESOURCES, sTool, 1084, "ShowAssignForm", 1,
False
| ' ---
| GoTo xt
| eh: oEH.PostErr Err, msMODULE, "PopupMenuAddStaffing", Erl
| xt: 'PopupMenuAddStaffing
| Set ctrl = Nothing
| Set cbar = Nothing
| End Sub
|
| ' Sub to populate the menus with similar code for submenu items
| Private Sub MenuItemAdd(sCaption As String, sTool As String, iFace As
| Integer, sAction As String, iBefore As Integer, bBeginGroup As Boolean)
| With Application.CommandBars("Cell")
| With .Controls.Add(msoControlButton, 1, , iBefore, True)
| .Caption = sCaption
| .TooltipText = sTool
| .FaceId = iFace
| .OnAction = sAction
| .BeginGroup = bBeginGroup
| End With
| End With
| End Sub
|
| Well, I get all my commands and icons to work. Any suggestions about why
the
| tooltips might not be working?
| --
| Thanks,
| Brian J. Matuschak
|


 
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
How to change custom color's tooltips from "Color Scheme"? Andy Smith[_2_] Excel Discussion (Misc queries) 0 June 10th 08 07:27 PM
Popup Menu / Shortcut Menu Dale Fye Excel Discussion (Misc queries) 2 October 12th 07 12:57 AM
UserForm Popup Menu ? RAFAAJ2000[_2_] Excel Programming 1 July 11th 05 05:47 PM
adding tooltips / helper tips to custom funcitons Scott Excel Programming 1 January 11th 05 05:32 AM
Popup Menu FuzzyLogic Excel Programming 3 February 18th 04 01:11 PM


All times are GMT +1. The time now is 08:51 AM.

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

About Us

"It's about Microsoft Excel"