03-15-2017 01:35 AM
Hi
I hope the title will not confuse you.
The following images illustrates my question.
I have compiled the run-time menu in my VI and I hope I can get the upper item name when the cursor moves in the run-time menu. For example, when I move the cursor on the second item "BBB", the item will turn to blue, and I hope the boolean indicator "BBB" will turn on at the same time. Or when I click the item "BBB", and the menu will be pulled down the sub-items, and the item "BBB" will turn to blue, and I hope the boolean indicator "BBB" will turn on at the same time without clicking the sub-items. The attached code is not work since I have no idea how to do it. Is there any suggestion?
03-15-2017 02:26 AM
Hallo William,
so you want to train your users to a different UX than is used in any other standard Windows program?
That's just not the way menus work in WindowsOS!
When you REALLY want this behaviour: fake the menu line by your own controls. Then you can use the mouse move/enter/leave events to achieve your goal!
03-15-2017 04:33 AM
@William1225 wrote:
Hi
I hope the title will not confuse you.
The following images illustrates my question.
I have compiled the run-time menu in my VI and I hope I can get the upper item name when the cursor moves in the run-time menu. For example, when I move the cursor on the second item "BBB", the item will turn to blue, and I hope the boolean indicator "BBB" will turn on at the same time. Or when I click the item "BBB", and the menu will be pulled down the sub-items, and the item "BBB" will turn to blue, and I hope the boolean indicator "BBB" will turn on at the same time without clicking the sub-items. The attached code is not work since I have no idea how to do it. Is there any suggestion?
I think its because Your Menu Item "BBB" Will Give you a null Value because you have "sub items" inside of It, you can try to play on your code, try if statement.
03-26-2017 10:35 PM
Hi syrpimp,
Thanks to your advice, but it is "Not Executed" after I clicked the BBB item.
The program seems it can not get the upper item in the menu bar...