Hello,
Is it possible to test if the menu is visible?
I don't mean the menu bar (File Edit etc), I mean can I test if the user has clicked the menu bar and any of the drop down menus are visible?
Thank you![]()


Hello,
Is it possible to test if the menu is visible?
I don't mean the menu bar (File Edit etc), I mean can I test if the user has clicked the menu bar and any of the drop down menus are visible?
Thank you![]()

No. You *might* be able to do something with the Advanced Menu Object, however.
Working as fast as I can on Fusion 3


I tried that and there didn't appear to be away.
It is a real problem for me.
When the user moves the cursor over buttons (in top left hand corner of my application), a tooltip appears explaining the use of the button. Problem is, when the "File" or "Edit" menu is open, the tooltips because the cursor is over the buttons but the menu is open at the same time and it looks horrible.

How did you get tooltips when the hover over the menu items then?
Working as fast as I can on Fusion 3


Using the tooltips object, when the cursor is overlapping the active object which is my button.
![]()
The problem is when the button is hidden by the menu, the tooltip still appears when the cursor is over it and it looks wierd/ugly/stupid etc...
Any whacky work around suggestions are welcome![]()


Disable windows menu buttons and create your own drop downs![]()


That's an idea.
I'd prefer not to though if I can avoid it though...
Two things:
1) You normally detect this because Windows sends a message when the mouse enters the button. If something else covers the button (e.g. a menu) then Windows doesn't send that message. So in a C program this kind of thing is easy.
2) If you are using something that is drawn, as opposed to a real Windows control (i.e. you are using an Active System Box instead of a Button) then you don't get the messages, because you're not a control. So to do the tooltip effect, you have to constantly check the position of the mouse, and if it's in the same area as your button then you show the tooltip... even if there's something in front of the button.
Your problem is number 2.
The easiest fix is to insert a Window Control object and use the 'Window has focus?' condition. When the menu is selected, the window in which the playfield is drawn does *not* have focus, so you shouldn't display a tooltip.


Thank you ChrisB, that is exactly the kind of answer I was after. Only thing, it doesn't work. When the menu is selected, the window still has focus.
Based on what you said about windows not detecting a button under a menu, I figured I'd try it with the standard MMF button object but this didn't work either. Only because I was still using the tooltip object to display the tooltip and doing so if the mouse was over the button (which is still true when the menu is covering it).
However, using the built in tooltip feature of the standard MMF button object, it does work as you described. When the button is hidden by a menu or any other windows object (edit box, list, etc) the built in tooltip does not display. Which is good!
Problem is, I want pictures as my buttons and if you switch the button object type from "Test Push Button" to "Bitmap Push Button", then you are no longer able to assign a tooltip.
However, you can still use have a tool tip if you use "Text and Image Push Button", and it is possible to shrink the button size so that only your image is visible. The problem with this is when you put your cursor over the button there is an ugly flicker and the actual button is visible for a short moment.
So back to square one. Any other suggestions for checking if the menu is visible?
Okay, that's weird - I tried it myself and it does exactly what I expected.
This is not because my suggestion works; I had left the 'Run while resizing' box unticked in the runtime options. This stops the application whenever you resize the window, or have a menu open.
I have no suggestions for you using the stock objects, but if you don't need the application to do anything while the menu's open or you're resizing it, you might like to investigate that option.