This may be a simple question.
I have a working menu with
slidingSubmenus: false
so clicking on submenus opens them up.
(I'm also using widescreen as I want the menu to always appear).
However they all start with menu collapsed. How do I launch it with all submenus open (expanded?)
Add mm-opened class to the submenu's parent LI tag.
Related
I am looking at this, but the documentation says that it will create a Customize Toolbar... menu.
What I am looking for is a way to have NSToolbar respond to the right click and display context menu where one of the item is "Customize...".
Will this functionality be turned on or I will have to do something extra? If I do, then what?
TIA!
If allowsUserCustomization is YES, the toolbar provides a context menu with a “Customize Toolbar…” item. You don't have to do anything else to make this menu work.
In Xcode's macOS application template, the View menu of the menu bar contains a “Customize Toolbar…” menu item which is enabled or disabled automatically based on the setting of allowsUserCustomization of the front window's toolbar. You don't have to do anything to make this work either.
If your app's main menu doesn't have the “Customize Toolbar…” menu item under any submenu, you can add one yourself by dragging a menu item out of the Objects Library. Connect the menu item's action to First Responder's runToolbarCustomizationPalette:.
I'd like to write a userstyle to modify the right-click menu in Firefox, but need its XUL class and ID. What is it?
(I'd usually use DOM Inspector to find it out, but one can't inspect a right-click menu because focus is lost when switching to the DOM Inspector window.)
The right click context menu that appears when you right click on a webpage has the id = contentAreaContextMenu. You can see here some information on modifying it.
I have a non-document Cocoa application with a menubar icon and status menu. I've added an "Open Recent" menu to the status menu in Interface Builder. Populating the menu works just fine:
[[NSDocumentController sharedDocumentController] noteNewRecentDocumentURL:
[NSURL fileURLWithPath:filename]]
Now I would also like to add a second "Open Recent" menu to a context popup menu. How would I create the menu programmatically so that it gets populated with entries automatically as it does for the version in the status menu?
I tried creating a copy of the one in the status menu, but it does not get populated. I assume that NSDocumentController is not aware of the menu (frankly, I don't know how it knows about the one in the status menu).
For reference, the best documentation on the inner workings of the Open Recent menu that I found is this:
http://lapcatsoftware.com/blog/2007/07/10/working-without-a-nib-part-5-open-recent-menu/
Unfortunately, it doesn’t help much with this, because even if you create the menu like this, it will be ignored by NSDocumentController. The menu must exist in the main menu before applicationDidFinishLaunching: call, otherwise it won’t be picked up — and consequently, duplicate ones are ignored too.
What I ended up doing, and what seems to work so far, is this:
The first idea was to pick the corresponding NSMenu from the main menu and attach it into other menus as well, hoping that reference counting will make this work. No such luck, setSubmenu throws if the submenu is already in another NSMenuItem.
So I “reparent” the submenu instead — when I need to show it in another menu, I remove it from the main menu’s Open Recent item and set it as submenu in the new menu. Later, I move it back. It’s an ugly hack, of course, but it gets the job done.
hi
I am creating firefox plugin.I have one button-1.png image and I have added it to customize toolbar.I have used one button.xul file to add button in toolbar.I have also used chrome.manifest, install.rdf,button.css,button.js.
It is showing button in toolbar,I dragged that button and dropped on toolbar.
Now my question is, when I click on that button, I want to pop up a small window.
so please tell me,what should I write in button.xul & button.js to pop up a small window.
How will I get a pop up window,when I click on a button?
What changes I need to do in button.xul & button.js?
You can use the window.open method to open a popup window. Take a look at this link. If you want to open a popup(and not a window) then you can use a panel. You can anchor a panel to an element (say button) when opening it using the openpopup method. Some examples are available here as well.
How to use Firefox Firebug on Superfish v1.4.8 Vertical Menu sample but on the sub-menus not the top menu.
Superfish Menu
I basically want to be able to freeze Firebug on a sub-menu selection to process but unsure how to.
Thanks.
You can set a breakpoint within the menu's javascript handling code to abort processing before any of the mouse-out or "hide the menu" type code is executed, which would leave the menu in the open state for you to inspect. You do that via the 'Script' tab in Firebug and right-clicking on the code line(s) you wish to break on.