user-interfaceeclipse-scout

Eclipse Scout Neon hide settings icon on table field


I would like to know how to hide settings wheel icon in header of table field.

enter image description here


Solution

  • Note: At the time of writing, Eclipse Scout Neon is not yet released.

    From browsing the source code I did not see a convenient getConfigured... method to quickly hide that menu.

    Fear not, you have two options to do so anyway. The menu you wish to get rid of is the OrganizeColumnsMenu.

    1. Override execInitTable on your table and hide the menu:

      getMenuByClass(OrganizeColumnsMenu.class).setVisibleGranted(false);

    2. Alternatively, override addHeaderMenus(OrderedCollection<IMenu> menus) and either remove the menu added by the default implementation, or not call the super implementation at all.