Reputation: 349
I have a VB NET form with one ToolStripSplitButton on it. The visible property is set by default to False. When I process the user request on the main part of the form, I may encounter soft errors that I don't want to use a msgbox for. What I do is add these soft errors into the DropDownItems of the control and make the control visible. If the user wants to see the messages, they can click on the menu icon which displays the DropDownItems.
I'd like to make this more sophisticated. I'm looking for suggestions/best practices. What can be done?
Upvotes: 3
Views: 2145
Reputation: 349
I added this code to allow users to see the messages merely by hovering over the control.
Private Sub sbtnToolStrip_MouseHover(sender As System.Object, e As System.EventArgs) Handles sbtnToolStrip.MouseHover
sbtnToolStrip.ShowDropDown()
End Sub
Private Sub sbtnToolStrip_MouseLeave(sender As System.Object, e As System.EventArgs) Handles sbtnToolStrip.MouseLeave
sbtnToolStrip.HideDropDown()
End Sub
And there is no need to code the click event!
Upvotes: 3