Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove the minimize/maximize buttons on views

I would like to hide the minimize/maximize buttons for views in Eclipse RCP.

Currently I'm running an RCP 3 product in RCP 4 (Compatability mode).

This is the top bar of the view containing all of the buttons. (I've covered up the logos etc)

Before

One method of removing the buttons is to create a style.css file and to specify that the buttons shouldn't be visible.

.MPartStack 
{
    swt-maximize-visible: false;
    swt-minimize-visible: false;
}

This results in this.

enter image description here

This is successfully removing the minimize/maximise buttons but is also shifting down the drop down button to a row below.

What might be causing this?

Update
As an alternative I've tried removing addons.swt from the e4xmi file. This included CleanupAddon, DnDAddon and MinMaxAddon. The buttons still remained.

like image 684
Michael Avatar asked Nov 02 '18 14:11

Michael


People also ask

How do you remove minimize and maximize buttons in Excel?

Alternative Method to Hiding/Showing the MenuRight-click over the titles of the menu and select the Minimize the Ribbon option. To make it full-size again, right-click over the titles of the menu and select the Minimize the Ribbon option again.

How do I disable maximize button?

Minimize button enables users to minimize the window to the taskbar. To remove minimize button we have to set the MinimizeBox property to false of the windows form. Now when you open the windows form you will notice the windows form's minimize button is in disable mode in the windows form.


Video Answer


1 Answers

I fixed this by changing the perspectives and views to the e4xmi file instead of the plugin.xml and setting them to not be toolbars.

In the plugin.xml file you can't specify if the view is a toolbar. In the e4xmi you can specify whether the part is a toolbar or not.

Here is the part configuration.

enter image description here

like image 157
Michael Avatar answered Oct 18 '22 05:10

Michael