Problem in getting a tooltip in VS 2005 addin
I have developed a VS 2005 addin which adds a buttont to toolbar.
I have changed the tooltip of button thru "AddNamedCommand2(...)" call
by editing the 4th parameter.
But when i hovour on the button i am not able to get the Tooltip as I
have given in the above call.
Can anybody help?Its urgent.
I had a problem with tooltips in VS 2005 Beta 2 and added some code in
my add-in to work around it. I have not removed this code so I don't
know if it's still necessary.
Anyway, here is the code (this is an extract with lots of stuff removed,
so don't take the code literally) :
Dim command As Command = Nothing
Dim status As vsCommandStatus =
' ci is a structure with some information about a command,
like its name, tooltip, handler function
command = commands.AddNamedCommand2(addInInstance, ci.Name,
ci.Tooltip, ci.Tooltip, True, ci.Handler,
status, vsCommandStyle.vsCommandStylePict, _
Dim butt As CommandBarButton
Dim commandBarCtrl As CommandBarControl = Nothing
Dim newCommandBar As CommandBar = ' get the right command
commandBarCtrl = CType(command.AddControl(newCommandBar,
butt = CType(commandBarCtrl, CommandBarButton)
' this property was not reliable in b2
butt.TooltipText = ci.Tooltip
Hope this helps,
[Non-text portions of this message have been removed]