Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Adding ToolTips to buttons

Hi,

I created an application that adds a new toolbar containing popup menus and
buttons. The popup menus contain commandbuttons (msoControlButton).

I did the following to enable viewing tooltips:
1) assigned text to the tooltiptext of all controls
2) set oCommandBars.DisplayTooltips = True before the buttons are added to
the container controls.

The tooltips are shown for all controls contained in the toolbar (popups and
buttons) but not for the buttons contained in the popups.

I will appreciate any suggestion.

Part of the code is below.

Thank you,

Carlos Lozano

Sub Createmenu
' Objects definitions here
Dim oToolBar As CommandBar
Dim oCommandBars As CommandBars
Dim oButton As CommandBarButton
Dim oPopUp As CommandBarPopup

Set oCommandBars = Application.CommandBars

oCommandBars("SWACO_DesignTool").Delete
oCommandBars.DisplayTooltips = True

On Error GoTo 0
Set oToolBar = oCommandBars.Add("SWACO_DesignTool", msoBarTypeMenuBar)

With Application.ActiveWindow
oToolBar.Left = .Left + .Width - oToolBar.Width
End With

Set oButton = oToolBar.Controls.Add(Office.msoControlButton)
With oButton
.Style = msoButtonCaption
.Caption = "MI SWACO ToolBar"
.OnAction = "About"
End With
' Create Popup and buttons for dialogs
Set oPopUp = oToolBar.Controls.Add(Office.msoControlPopup)
oPopUp.BeginGroup = True
oPopUp.Caption = " Utilities"
oPopUp.Width = Len(oPopUp.Caption)
oPopUp.TooltipText = "Utilities menu."

Set oButton = oPopUp.Controls.Add(Office.msoControlButton)
With oButton
.BeginGroup = True
.Style = msoButtonCaption
.Caption = "Create New Project"
.OnAction = "NewProject"
.TooltipText = "This is the tooltip description text"
End With

Set oButton = oPopUp.Controls.Add(Office.msoControlButton)
With oButton
.Style = msoButtonCaption
.Caption = "'Save As' Project File"
.OnAction = "ExportDesign"
.TooltipText = "This is another tooltip description text"
End With
oToolBar.Visible = True
end sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 811
Default Adding ToolTips to buttons

"Carlos Lozano" wrote in message
...
I created an application that adds a new toolbar containing popup menus
and
buttons. The popup menus contain commandbuttons (msoControlButton).

I did the following to enable viewing tooltips:
1) assigned text to the tooltiptext of all controls
2) set oCommandBars.DisplayTooltips = True before the buttons are added to
the container controls.

The tooltips are shown for all controls contained in the toolbar (popups
and
buttons) but not for the buttons contained in the popups.


Hi Carlos,

Unfortunately, this is just the way command bar controls are designed.
Controls of type msoControlPopup don't display tooltips even if they have
tooltips assigned to them.

--
Rob Bovey, Excel MVP
Application Professionals
http://www.appspro.com/

* Take your Excel development skills to the next level.
* Professional Excel Development
http://www.appspro.com/Books/Books.htm


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Adding ToolTips to buttons

Hello Rob,
I thought that was the answer and was hoping to be wrong.

Thank you,

Carlos Lozano
www.caxonline.net

"Rob Bovey" wrote:

"Carlos Lozano" wrote in message
...
I created an application that adds a new toolbar containing popup menus
and
buttons. The popup menus contain commandbuttons (msoControlButton).

I did the following to enable viewing tooltips:
1) assigned text to the tooltiptext of all controls
2) set oCommandBars.DisplayTooltips = True before the buttons are added to
the container controls.

The tooltips are shown for all controls contained in the toolbar (popups
and
buttons) but not for the buttons contained in the popups.


Hi Carlos,

Unfortunately, this is just the way command bar controls are designed.
Controls of type msoControlPopup don't display tooltips even if they have
tooltips assigned to them.

--
Rob Bovey, Excel MVP
Application Professionals
http://www.appspro.com/

* Take your Excel development skills to the next level.
* Professional Excel Development
http://www.appspro.com/Books/Books.htm



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
How to change tooltips for user-modified colors? Andy Smith[_2_] Excel Discussion (Misc queries) 1 September 15th 09 12:30 AM
ToolTips or ScreenTips Stuart Grant New Users to Excel 3 September 30th 05 04:40 PM
adding tooltips / helper tips to custom funcitons Scott Excel Programming 1 January 11th 05 05:32 AM
Adding buttons with macros Shatin Excel Programming 0 January 28th 04 04:40 AM
Tooltips David Excel Programming 4 September 22nd 03 03:02 AM


All times are GMT +1. The time now is 01:09 AM.

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"