I have a ListBox on the left side of my form. The user has the option of "auto-hiding" it so that it disappears off to the left, and only reappears while the user moves their mouse onto it.
If the ListBox has few items in it, this feature works beautifully.
However as soon as I put enough items into the ListBox such that there is now a scrollbar, funny things start to happen. The MouseEnter code is only triggered when the user has moved their mouse into the ListBox past the scrollbar. This means that I must have more then the width of the scroll bar peeking or they will never be able to show it.
Additionally, the user is not able to scroll at all if the ListBox is not in focus. If they try to click the scrollbar to scroll, the ListBox disappears. If they click inside the ListBox to focus it (so that they can scroll with the mouse wheel), then they lose their selection.
Is there any way I can extend the bounds of MouseEnter and MouseLeave to include the scrollbar?