Skip to content

DevFaqTweakRegistryByCodeDeduction

Antonio Vieiro edited this page Jan 25, 2018 · 1 revision

DevFaqTweakRegistryByCodeDeduction

How do I remove a menu item or toolbar button from an application’s GUI?

  • If you want to remove the action from a toolbar, then remove entries like:

<folder name="Toolbars">
    <folder name="Build">
        <file name="org-nvarun-tat-SayCheez.shadow">
            <attr name="originalFile"
                  stringvalue="Actions/Tools/org-nvarun-tat-SayCheez.instance"/>
            <attr name="position" intvalue="325"/>
        </file>
    </folder>
</folder>
  • If you want to remove either one of the separators, or even both of them, then delete the entries looking like:

<file name="org-nvarun-tat-separatorAfter.instance">
    <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
    <attr name="position" intvalue="175"/>
</file>
<file name="org-nvarun-tat-separatorBefore.instance">
    <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
    <attr name="position" intvalue="125"/>
</file>
  • If you want to remove the action from a menu, and retain it only on the toolbar, then remove entries like:

<folder name="Menu">
    <folder name="Tools">
        <file name="org-nvarun-tat-SayCheez.shadow">
            <attr name="originalFile"
                  stringvalue="Actions/Tools/org-nvarun-tat-SayCheez.instance"/>
            <attr name="position" intvalue="150"/>
        </file>
        <file name="org-nvarun-tat-separatorAfter.instance">
            <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
            <attr name="position" intvalue="175"/>
        </file>
        <file name="org-nvarun-tat-separatorBefore.instance">
            <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
            <attr name="position" intvalue="125"/>
        </file>
    </folder>
</folder>
  • If you want to remove an item from a module over which you have no control, such as a NetBeans Platform module, use the _hidden attribute:

<folder name="Toolbars">
    <folder name="Build">
        <file name="org-nvarun-tat-SayCheez_hidden"/>
    </folder>
</folder>

Apache Migration Information

The content in this page was kindly donated by Oracle Corp. to the Apache Software Foundation.

This page was exported from http://wiki.netbeans.org/DevFaqTweakRegistryByCodeDeduction , that was last modified by NetBeans user Geertjan on 2012-01-23T21:45:24Z.

NOTE: This document was automatically converted to the AsciiDoc format on 2018-01-26, and needs to be reviewed.

Clone this wiki locally