LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

remove run time menu

Dear All,

Is there any way to Remove Run time menu of a particular control during the execution of a program?

 

i have a radio control in which i have 2 radio buttons. The run time menu of both, the control and the radio buttons is different.

After certain period, i want to remove the run time from the radio buttons.

 

Thanks,

Ritesh

0 Kudos
Message 1 of 21
(5,154 Views)

 

Hi there

 

I can't find a way to remove/disable the runtime menu of a control at runtime. Maybe you could add an additional (boolean) control besides the other controls (e.g. marked with an "?" decal), attach the rtm to these boolean controls and then show/hide or enable/disable these booleans instead.

Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
0 Kudos
Message 2 of 21
(5,142 Views)

hi chrisger,

thanks for your post, but i couldn't get the idea you posted.

could you pls post an example demonstrating ur idea.

 

Thanks,

Ritesh

0 Kudos
Message 3 of 21
(5,129 Views)

 

See attachment...

Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
0 Kudos
Message 4 of 21
(5,127 Views)

There is a very simple way to disable a  RunTime menu : the only condition is that you must first build a custom menu for the control.

Then you can use an event loop as shown on the picture below to delete (or not) dynamically the menu upon activation. 

 

Message Edited by chilly charly on 01-02-2009 02:16 PM
Chilly Charly    (aka CC)
Download All
Message 5 of 21
(5,121 Views)

 

That's cool! Kudos for that.

Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
0 Kudos
Message 6 of 21
(5,113 Views)

Hey Guys,

Thanks alot.

 

But i am kinda stuck in some other problem related to menu Selection.

 

I have a Radio Button Control and inside i have 1 radio buttton.

at times i just want to delete the menu items of Radio Button Control and not the Radio Button inside the control.

its just not giving the desired O/P.. 

 

pls have a look at my VI, and let me know if dere's a work around.

 

Thanks,

Ritesh

0 Kudos
Message 7 of 21
(5,061 Views)

ritesh024 a écrit:

I have a Radio Button Control and inside i have 1 radio buttton.

at times i just want to delete the menu items of Radio Button Control and not the Radio Button inside the control.


This is going to be tricky. To be honest, I think there is a bug in the way the popup menus are handled by LabVIEW. At first, I thought that there was no solution to your problem, but I ultimatelly found a workaround. Here we go :
Step 1 - Register for the "shortcut menu activation" events of the radiobuttons ;
Step 2 - create a static empty popup menu for the RB housing control ;
Step 3 - create static popup menus for all the RS radio buttons ;
Step 4 - If a popup menu is not required for the housing control (RB) or if a radiobutton has been activated while a housing control popup menu was required, then do nothing (ie use the empty static popup menu). This is tricky because you have to check which control has been activated : instead of looking at the control name (if you had to change it you would be obliged to modify the diagram !), the trick is to wait for a "shortcut menu activation" event, and to use the "subObj" reference to get the name of the activated object : this is an empty string when the housing control is activated, otherwise, it's the name of the radiobutton. 
else, if the housing control has been activated, insert the menu items in the popup menu.
 
Step 5 - Create an event case to manage the radiobuttons "shortcut menu activation" events : delete dynamically the radiobutton menus if they are not required.
 
I hope there is a more obvious solution. Try the attached VI.

 

Message Edité par chilly charly le 01-03-2009 07:13 PM
Chilly Charly    (aka CC)
Download All
Message 8 of 21
(5,035 Views)

Another option would be to just use a filtering mouse down event and discard right-clicks if RTMs should be disabled.

 

Here's a simple example that globally disables/enables the RTM for the radio button control. You could make it more selective by taking the "coords" event output into consideration. From the coordinates, you can easily calculate which part of the control was right-clicked and discard accordingly. Modify as needed.

 

.

Message Edited by altenbach on 01-03-2009 01:07 PM
Download All
Message 9 of 21
(5,016 Views)


altenbach a écrit:

Another option would be to just use a filtering mouse down event and discard right-clicks if RTMs should be disabled.

 

Here's a simple example that globally disables/enables the RTM for the radio button control. You could make it more selective by taking the "coords" event output into consideration. From the coordinates, you can easily calculate which part of the control was right-clicked and discard accordingly. Modify as needed.

  


Hum... Disabling the RTM for the whole control is not the problem. Filtering the "Shortcut menu activation ?" event is even more straight forward.
 Here, the challenge is to have the RTMs for the radio buttons inside still actives while the RTM for the housing control is programmatically enabled or disabled.

 

Message Edité par chilly charly le 01-03-2009 10:24 PM
Chilly Charly    (aka CC)
Message 10 of 21
(5,012 Views)