LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the upper item if I don't click the sub-item in the run-time menu?

 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?

 

20170315002.png

 

20170315003.png

20170315001.png

Download All
0 Kudos
Message 1 of 4
(2,634 Views)

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!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 4
(2,610 Views)

@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?

 

20170315002.png

 

20170315003.png

20170315001.png


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.



Thank you & Best regards
syrpimp

=======================================================
“You must continue to gain expertise, but avoid thinking like an expert." -Denis Waitley
0 Kudos
Message 3 of 4
(2,580 Views)

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...

 

0 Kudos
Message 4 of 4
(2,538 Views)