DevFaqSwitchingMenusByContext

(Difference between revisions)
m
m
Line 25: Line 25:
</pre>
</pre>
-
It's generally much easier to do this from the NetBeans IDE, [http://thread.gmane.org/gmane.comp.java.netbeans.modules.openide.devel/26921/focus=26939 as described here].
+
It's generally much easier to do this from the NetBeans IDE, [http://thread.gmane.org/gmane.comp.java.netbeans.modules.openide.devel/26921 as described here].

Revision as of 16:08, 2 December 2009

How can I change the contents of a menu according to the selected file in the editor?

Can I hide or show a whole menu or toolbar?

To hide a menu or toolbar you have to edit your layer.xml and append _hidden to the name of the desired menu or toolbar. You may also hide *.instance files.

<folder name="Menu">
    <!-- Hide View menu -->
    <folder name="View_hidden"/>
    <folder name="SomeMenu">
        <!-- Hide a single menu item -->
        <file name="SomeAction.instance_hidden"/>
    </folder>
</folder>
<folder name="Toolbars">
    <!-- Hide Edit toolbar -->
    <folder name="Edit_hidden"/>
</folder>

It's generally much easier to do this from the NetBeans IDE, as described here.

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo