How to add a new Menu at the end of MenuBar? - objective-c

One question is : Now I want to add a new Menu at the end of MenuBar, not to add a menuitem at the known menu. just like the Xcode Items: The last menu is Help , I want to add a new Mneu(MyMenu) behind the Help Menu ? How to do ? Thanks very much!

Generally, you should not add or remove items in the main menu at run time, because it breaks your users' muscle memory. Enable or disable them instead, and you'll have a much better UI.
Assuming you've found a good reason to do this, the way to do it is to get the main menu from the shared NSApplication object, then insert the menu item for your new menu. The menu item's submenu is the actual menu you're inserting. (Of course, you can create the menu and menu item in IB and access the menu item through an outlet.)

Related

How expand collapse on menu to be implemented?

I am new on bigcommerence any one guide me how can i implement + icon functionality on clicking menu item?
here is my website: forevermodo
when i click on "New In" menu button in mobile view it takes me to a link but i want it to expand the sub menu instead.
any one guide me what should i do here? any help would be appreciated.

Hide menu item "warehouse" in openerp6.1

In openerp6.1 I am working on warehouse(stock)
I am trying to customize stock and create new warehouse_management module now I want to hide original warehouse menu,sub menu and put my own WMS menu internally I use many functionality of stock, so if I delete menu item i can't access existing functionality
I just want to hide warehouse menu and its sub menu
Requirement is when I am install my wms module it automatically hide warehouse menu
if you not want to delete menu then you can done one thing, create a new group and overwrite the same menu again in your module
<menuitem name="Project" id="base.menu_main_pm" groups="group_new_hide" sequence="40"/>
So until you give this new group any user the menu remain hidden
Hope this help

context menu strip within another context menu

hi guys can any one pls help me with this thanks
Im using vb.nwt 2010
I wanted to create a context menu that shows another context menu when the item is clicked
I already have the running code for the first context menu but im lost at showing another context menu within the first one
thanks any help will be appriciated
If what you are asking is 'Can I create a sub menu on a context menu in the same way that a standard menu has one (as per my illustration)?' then the answer is yes. Just use the ContextMenuStrip control which you can find under the Menus & Toolbars strip in the toolbox panel in visual studio.
Set up the context menu the way that you wish it to be and then assign that context menu as the context menu of whichever control you want to invoke it at runtime.

Working with Multiple Windows

In my MainMenu.xib, I have the main window of my app with web view, Now i have added a new window (with text field and button) in MainMenu.xib.
I have problem to add a menu tab where i click and my newly added window appears (Not on app Launching). How to connect menu tab item with window..???
Thanks in Advance
Would you like to do it without a single line of code?
i.e. Using Binding.
Here we go:
Create a secondary Window that you want to open on menu click.
Uncheck "Release when Close"
Create a new menu item : ctrl+drag from menu to window, select "makeKeyAndOrderFront"
That's it.

Visual Basic & Context Menu

Is there a way to add a Header to the popup menu? I don't find a property for this.
You could also simulate a header on the context menu by putting the information you want to display in the header as the first item in the context menu. Put a separator (or perhaps two) underneath it and put no code behind it.
That visually separates the item and users will learn pretty quick that clicking the first item doesn't do anything.
This may not work in your situation, but whenever I needed to show a context menu off of a grid row that wasn't the current/highlighted row, I made that row the current row first, then showed the menu. That would eliminate the need for a header on the menu. I assume you're showing the context menu if the user right clicks on the row. Well before showing the context menu, make sure that row is current and highlighted.
Do as Corin says, but disable the first item as well. If you disable it, that should remove confusion entirely.