Open VfpImaging opened 1 year ago
As I mentioned in issue #18, the problem with this is that a menu with a submenu will disappear as soon as the mouse moves into the submenu. Run the sample form that comes with the project to see an example: the New Items button has a couple of submenus you can try.
see also issue #3 i'm not using submenus so haven't taken this further. But my original solution is working well.
📝 The menu timer is conflicting with some other complex windows events from some complicated forms.
Here are some few modifications that will make us completely leave the Menu Timer, and avoid some errors previously documented: The trick is in having a wider border, by changing the "Padding" value to 5. This way, when the mouse reaches this border, the menu will be hidden. The MenuForm "Deactivate()" method should do some extra caring as well. Very simple changes, with IMHO, a nice result.
1 - Set the property in SfRibbonMenu.Padding = 5 && Was 2, we need a wider "border" to detect the mouse
2 - In SfRibbonMenuForm.ShpBorder.MouseEnter() add the following code:
Thisform.Hide()
3 - In SfRibbonMenuForm.Deactivate() add the following code:Thisform.Hide()
4 - In SfRibbonMenuForm.tmrClick.Timer() , clean the code for testingIf you'd like to see this feature implemented, add a 👍 reaction to this post.