I'm handling colors for menustrips, so, since i have a black list with white text, when an item is selected it turns azure-ish. My problem would be to read the text inside, since it's white.
While you can solve this using Mouse_Enter and Mouse_Leave, this problem remains when you get to an adjacent item, like a submenu or to a previous menu but not selecting anything different. Like, imagine having a classic Windows list,
Edit ->
----Cut
----Copy
----Paste
----Find ->
--------Text
--------Image
--------Etc.
If you select Text, Find is still selected. Similarly, if you select again Find, Text still remains selected unless you select Cut, Copy or Paste.
So, in these cases the Mouse events are useless, since the menu option stays selected even though the mouse isn't there anymore. So, in my case, using Mouse_Enter to get a dark text and Mouse_Leave to get back a clear text, would work while navigating in the same submenu (meaning, Cut, Copy, etc.) but not when it comes to multiple selections.
Do you know a way to state something like "while/when this menu item is selected (not while the mouse is hovering) change the forecolor"?
I could make something "dumb" like creating an array/list containing the names of "menus that are open right now" so anytime i select something i would refresh it and change the color for those in the list, still it seems a "dumb" idea to me and i'd rather do something just smarter...
While you can solve this using Mouse_Enter and Mouse_Leave, this problem remains when you get to an adjacent item, like a submenu or to a previous menu but not selecting anything different. Like, imagine having a classic Windows list,
Edit ->
----Cut
----Copy
----Paste
----Find ->
--------Text
--------Image
--------Etc.
If you select Text, Find is still selected. Similarly, if you select again Find, Text still remains selected unless you select Cut, Copy or Paste.
So, in these cases the Mouse events are useless, since the menu option stays selected even though the mouse isn't there anymore. So, in my case, using Mouse_Enter to get a dark text and Mouse_Leave to get back a clear text, would work while navigating in the same submenu (meaning, Cut, Copy, etc.) but not when it comes to multiple selections.
Do you know a way to state something like "while/when this menu item is selected (not while the mouse is hovering) change the forecolor"?
I could make something "dumb" like creating an array/list containing the names of "menus that are open right now" so anytime i select something i would refresh it and change the color for those in the list, still it seems a "dumb" idea to me and i'd rather do something just smarter...
Last edited: