PRB: ToolTipText Property On MMCToolbar Button Does Not Update (242322)
The information in this article applies to:
- Microsoft Management Console 1.1
- Microsoft Management Console 1.2
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
This article was previously published under Q242322 SYMPTOMS
A SnapIn project developed with the MMC Snap-in Designer for Visual Basic may require that a MMCToolbar button's ToolTipText property be changed at runtime. While the ToolTipText property for an MMCToolbar button cannot be changed dynamically, it can be changed the next time the MMCToolbar control is attached to a view.
CAUSE
By design the ToolTipText property for an MMCToolbar button control cannot be changed while it's MMCToolbar is being displayed in the current view.
RESOLUTION
Remove the MMCToolbar button from the MMCToolbar button collection. Modify the ToolTipText property and re-add the MMCButton to the MMCToolbar control. The next time the MMCToolbar control is attached to a view, the updated ToolTipText will be displayed. The following code demonstrates how to achieve this functionality:
' only modify a certain toolbar button
Select Case Button.Key
Case "Test":
' change the tooltiptext for this button
Button.ToolTipText = "This is a different tip"
' remove the button from the toolbar control
Call Toolbar1.Buttons.Remove(Button.Index)
' re-add the button to the toolbar control
Call Toolbar1.Buttons.Add(Button.Index, Button.Key, Button.Caption, Button.Style, Button.Image, Button.ToolTipText)
End Select
STATUS
This behavior is by design.
Modification Type: | Minor | Last Reviewed: | 3/20/2004 |
---|
Keywords: | kbDSWManage2003Swept kbnofix kbprb kbSnapIn KB242322 |
---|
|