LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Exclamatory Symbol

when ever i create a manu bar i have found an exclamtory symbol at the end of the each item ..how can i avoid it..?
0 Kudos
Message 1 of 11
(7,521 Views)
Thats normal. Whenever you have a menu-bar item, that has no sub-items it gets the exclamation-mark, to show the user that a emidiate action will happen when pressing on this menu-item. If you add sub-menu items, the exlamation-mark will not be there anymore.
0 Kudos
Message 2 of 11
(7,520 Views)

Maybe for CVI its normal. But not for someone that wanna style his own menu bar. Actually with exclamation mark i feel patronizing ... and I dont like that at all.

 

 

0 Kudos
Message 3 of 11
(7,405 Views)
ya..in my application i do not use the submenu...it does't look good as have more than 7 menu items..hmm..why CVI developers made like this way....is there any complexity to contruct a menu item with out exclamation mark...??
0 Kudos
Message 4 of 11
(7,387 Views)
davidx and monky:

The exclamation mark in menus goes back a long, long way, to at least version 2.0 of LabWindows, back when it ran only in the DOS platform. Back then, UI standards were quite different, to the extent that any existed at all. Since then, things have evolved to the point where (and I agree with you) the exclamation mark looks odd at best, and quite irritating at worst. We've left it around all these years, because 1) it's always very important to maintain backwards compatibility whenever a new version of the CVI runtime comes out, and 2) there was never a clear point of discontinuity in global UI standards to the point where from one year to the next, the exclamation mark went from tolerable to unacceptable.

But recently we've come to agree with you that the exclamation mark is doing more harm than good. Besides, if someone really wants one, they can always add it to the menu label. So, in the next version of CVI, we'll either get rid of it, or make it optional.

If anyone reading this is particularly attached to the exclamation mark, please let us know in this thread, and we'll take that into account.

Luis
NI

0 Kudos
Message 5 of 11
(7,379 Views)

It's really irritating to have the exclamatory symbol in menu item. It has not been removed still in CVI2013 which i am using.

0 Kudos
Message 6 of 11
(5,797 Views)
Message 7 of 11
(5,788 Views)

I ran into this recently when I moved Panels and Menubars into separate .uir files. I found a reference here:

 

https://zone.ni.com/reference/en-XX/help/370051AG-01/cvi/uiref/cviprogramming_with_menu_bars/ 

 

In my pre-existing code, I see we load a menu bar from a panel like this:

 

MenubarMaintenance = LoadMenuBar (PanelMaintenance, "PanelSVC.uir", MENUBAR_MA);

 

But using MenubarMaintenance for the handle of SetMenuBarAttribute returns -163 (The attribute passed is only valid for menu bars.):

 

SetMenuBarAttribute (MenubarMaintenance, MENUBAR_MA_RETURN, ATTR_SHOW_IMMEDIATE_ACTION_SYMBOL, FALSE);

 

SetMenuBarAttribute's menubarHandle parameter is described as:

 

menuBarHandle

Specifier for a particular menu bar that is currently in memory. You can obtain this handle from functions such as LoadMenuBar and NewMenuBar. If the menu bar was automatically loaded through LoadPanel, use GetPanelMenuBar to get the menu bar handle.

 

I am getting MENUBAR_MA_RETURN from the generated header file for the menubar:

 

     /* Menu Bars, Menus, and Menu Items: */

#define  MENUBAR_MA                       1
#define  MENUBAR_MA_RETURN                2       /* callback function: HideMaintenancePanel */
#define  MENUBAR_MA_OPTIONS               3
#define  MENUBAR_MA_OPTIONS_COMMUNICATIONS 4      /* callback function: ShowCommunicationsOptionsPanel */
...etc...

 

Is there a trick to using the menuBarHanlde return from LoadMenuBar() as the menuBarHandle in the SetMenuBarAttribute call?

 

Where is my typo?

0 Kudos
Message 8 of 11
(5,236 Views)

Maybe a bug? I see it likes ATTR_DIMMED, but not ATTR_SHOW_IMMEDIATE_ACTION_SYMBOL:

 

// Works

SetMenuBarAttribute (menuBar, MENUBAR_MA_RETURN, ATTR_DIMMED, FALSE);

 

// Fails

SetMenuBarAttribute (menuBar, MENUBAR_MA_RETURN, ATTR_SHOW_IMMEDIATE_ACTION_SYMBOL, FALSE);

0 Kudos
Message 9 of 11
(5,233 Views)

I tend to consider that an attribute of the whole menu bar and not of individual items, while dimmed is instead valid for individual items.

In effect you can see that attribute listed into "Menu appearance" group of attributes in the attribute selection window, no into "Menu and Item Settings" group. So you should pass 0 in Menu Item ID parameter and the exclamation mark will appear next to every immediate items in the menu bar.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 10 of 11
(5,219 Views)