开发者

How to remove items from menu in netBeans platform?

开发者 https://www.devze.com 2022-12-22 23:23 出处:网络
I have modu开发者_运维百科le application. When I run it, the main window of that app has quite complex menu.

I have modu开发者_运维百科le application. When I run it, the main window of that app has quite complex menu. How to remove some items from menu?


You can remove menu items from the menu bar by adding entries to your project's layer.xml file.

You should read through 'Tweaking the User Interface' from the 'NetBeans Platform HTML Editor' tutorial to get a rough idea of what you will need to do.

There is another tutorial-ish description of using the layer file to hide items, too.


In netbeans 8.0 , the layer file is generated when ever a module contains 'configuration type' annonations in java code, for example a module with top component. The generated layer.xml is located at build directory classes/META-INF/generated-layer.xml. However, the generated-layer.xml is not editable. To hide/show menubar / tool bar, click on the module, click other and add XML layer file. Now under the important files you can see XML layer. Expand it. Now expand . Expand the "Menu Bar". Delete the menu bar which you don't want.


The easier way appears to be, as Martin Krauskopf wrote:

Just go to:

Projects view (Ctrl-1) >> your module >> Important Files >> XML Layer >> Menu Bar >> Help

and delete what you want (it will actually generate appropriate content in layer.xml of the module).


You can remove it in layer.xml

layer in context - Menu Bar

here's the link

http://platform.netbeans.org/tutorials/nbm-htmleditor.html

0

精彩评论

暂无评论...
验证码 换一张
取 消