G
Guest
How often do you disagree with the design decisions that the Framework
developers made? (Don't answer; that's a rhetorical question.)
In this case I disagree with one but offer up the solution I found.
IMHO if you set ShowItemToolTip to false for a menustip, its value should
recurse to the sub menus. But it doesn't. So here's the work around:
Private Sub gooseMenu(ByVal items As ToolStripItemCollection, ByVal dtt
As Boolean)
For Each msi As ToolStripItem In items
Dim mi As ToolStripMenuItem = TryCast(msi, ToolStripMenuItem)
If mi Is Nothing Then Continue For
Dim dd As ToolStripDropDown = mi.DropDown
dd.ShowItemToolTips = dtt
If mi.DropDownItems.Count > 0 Then gooseMenu(mi.DropDownItems,
dtt)
Next
End Sub
Private Sub gooseOptions()
Dim dtt As Boolean = My.Settings.DisplayToolTips
Me.ToolTip1.Active = dtt
Me.MainMenuStrip.ShowItemToolTips = dtt
gooseMenu(Me.MainMenuStrip.Items, dtt)
End Sub
Better Ideas will cheerfully entertained. RTFM will also be done, if you
provide the link.
--
Regards,
Al Christoph
Senior Consultant
Three Bears Software, LLC
just right software @ just right prices @ 3bears.biz
Microsoft Certified Partner (ISV)
Coming soon: Windows Mail for Vista.
developers made? (Don't answer; that's a rhetorical question.)
In this case I disagree with one but offer up the solution I found.
IMHO if you set ShowItemToolTip to false for a menustip, its value should
recurse to the sub menus. But it doesn't. So here's the work around:
Private Sub gooseMenu(ByVal items As ToolStripItemCollection, ByVal dtt
As Boolean)
For Each msi As ToolStripItem In items
Dim mi As ToolStripMenuItem = TryCast(msi, ToolStripMenuItem)
If mi Is Nothing Then Continue For
Dim dd As ToolStripDropDown = mi.DropDown
dd.ShowItemToolTips = dtt
If mi.DropDownItems.Count > 0 Then gooseMenu(mi.DropDownItems,
dtt)
Next
End Sub
Private Sub gooseOptions()
Dim dtt As Boolean = My.Settings.DisplayToolTips
Me.ToolTip1.Active = dtt
Me.MainMenuStrip.ShowItemToolTips = dtt
gooseMenu(Me.MainMenuStrip.Items, dtt)
End Sub
Better Ideas will cheerfully entertained. RTFM will also be done, if you
provide the link.
--
Regards,
Al Christoph
Senior Consultant
Three Bears Software, LLC
just right software @ just right prices @ 3bears.biz
Microsoft Certified Partner (ISV)
Coming soon: Windows Mail for Vista.