Hello,
using a MenuBar I need a MenuItem called Spacer to have some MenuItems on the left and one at the right side of the bar. That works fine, Spacer is disabled, works too. But on mouse hover Spacer changes its back color, but should not. How to solve this?
At WindowsForms I didn’t need any spacer, I set alignment of ToolStrip – MenuItem to left or right.
Kind regards
Ottilie
Hello Julie,
thank you very much for the quick reply. I have looked at your code, my scenario is slightly different, but I have found the error.
But that shouldn’t be relevant. I opened the Page1.vb[Design] designer view -> Properties -> MenuBar ->MenuItems(Collection) ->spacer and set Enabled to False. Thought that was it.
With the help of your code I regocnized that at the file Page1.Designer.vb the line
Me.spacer.Enabled = False
is missing. Add this and the problem is solved.
But now it becomes strange. Opening the Page1.vb[Design] designer view again, navigating to spacer -> Enabled = True. Leaving the dialog on OK or on Cancel
Me.spacer.Enabled = False
is missing again at Page1.Designer.vb.
For now, I will pay careful attention on Page1.Designer.vb and the problem is solved for me.
Ottilie
I’m not sure how yours is set up, but when I try to reproduce, the spacer does not change back color on hover. See my sample.
-Julie
Please login first to submit.