spaghetti_developer Posted November 16, 2009 Report Share Posted November 16, 2009 Hi to All, I need to create a custom shortcut menu that will become checked (or disable) when user click on it. I saw the Set Menu Item Info function in user-menu palets but I don't understand how I can use it. Can somebody tell me how I can use it? Quote Link to comment
jgcode Posted November 16, 2009 Report Share Posted November 16, 2009 Hi to All, I need to create a custom shortcut menu that will become checked (or disable) when user click on it. I saw the Set Menu Item Info function in user-menu palets but I don't understand how I can use it. Can somebody tell me how I can use it? Hi Spaghetti Love your avatar by the way!! Yes you will need to use those functions. Attached is an example. Run main.vi and then repeately select Custom Item from the menu to toggle its checked property. You can edit the menu by selecting Edit >> Run-Time Menu (when the VI is not running of course). Custom Run Time Menu.zip [LabVIEW8.6] Quote Link to comment
spaghetti_developer Posted November 16, 2009 Author Report Share Posted November 16, 2009 Thank you for your reply but it isn't what I want to do. I need to check a custom control (right-click) shortcut menu. Controls don't have the menu ref in "shortcut menu selection (user)", I forgot to tell you that my control is a tree control. I'm working for find the solution and may be I found it. When I'll finish my code I'll post it for share it with everybody. Quote Link to comment
Ton Plomp Posted November 16, 2009 Report Share Posted November 16, 2009 You should check and uncheck in the 'shortcut menu activation' event. Deciding wheter a valued needs to be checked should be stored inside your application. A menu cannot automagically remember wheter it needs to be checked. Ton Quote Link to comment
jgcode Posted November 16, 2009 Report Share Posted November 16, 2009 You should check and uncheck in the 'shortcut menu activation' event. Deciding wheter a valued needs to be checked should be stored inside your application. A mnu cannot automagically remember wheter it needs to be checked. Ton Ton is absolutely correct Attached is an example. Run it as before. The principle will be the same for your application - your app must hold the persistent data, then the menu is prepared on the filter event. The menu does not hold the data. Custom Run Time Menu Control.zip [LabVIEW8.6] Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.