LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How should the 'SetCtrlMenuAttribute' function of the TS API be used?

I have a single menu bar and need to dim/enable various options at various times. I am puzzled as to the use of the third parameter (Menu Item ID) in this case. It seems to only be necessary for menu items created 'on-the-fly'. I have tried setting it to '0' and to '1' but the attributes of the menu item won't change. I don't recall this parameter being in previous versions.
Can anyone help, example code, etc. ?
See attached code sample.
0 Kudos
Message 1 of 2
(2,998 Views)
I suspect you're looking at the wrong function. SetCtrlMenuAttribute is not intended for use with menus in menubars. It's intended to use for UI controls which have right-click menus associated with them (tree controls and table controls). The function you should look at instead is SetMenuBarAttribute.

Luis
NI
0 Kudos
Message 2 of 2
(2,998 Views)