From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
04-10-2015 07:38 AM
I want to create some some shortcut menus for multiple controls of the same type, I want to do it programatically so I dont have to go one by one editing the custom menus, or copy paste the same control since I would have to re-build all my controls every time I want to add a new shortcut menu option (becouse I dont know yet how many options I will need). How can I programatically add a element to the shortcut menu of a control, and save it in to it? For example, in shortcut menu activation event, I can modify add/remove elements, but this do not save on to the shortctu menu you edit statically in edit mode of the vi. Ty!
04-10-2015 07:39 AM
PD: I know that I could just create the menu dinamically every time menu activation event happens, but this would be slower than having it already created on edit mode?
04-10-2015 07:43 AM
Is this function what im looking for? "Set Menu Item Info Function"
04-11-2015 02:41 AM
04-12-2015 05:52 AM
Yes Mike, I will create all shortcuts on runtime, time diference is not a factor! Ty!
04-12-2015 01:20 PM
Mike, How do you detect when the user does not select an item of the shorcut menu by cliking somewhere else in the screen?
04-12-2015 01:31 PM
04-12-2015 02:24 PM
But if you are w8ing in a event structure for it the only chance is to put a timeout so you dont get stuck? When I create the menu I weit for the event rigth after, im triying to avoid timeouts so my while loop only runs when a event happens.
04-12-2015 02:45 PM
04-12-2015 02:59 PM - edited 04-12-2015 03:02 PM
I think my problem is that im trying to detect the case in a separeted event structure, I detect activation in one event strcuture, then go to a case strcutrue when the shorcut activation fires, and then (inside the case structure and in a separated time structure from the frist that triggered activation for shorcut) I weit for selecction. You mean that if I w8 for the selecction in the same Event structure than the rest of the user interface that wont block my program rigth?