Marko Zadravec
Marko Zadravec

Reputation: 8740

Eclipse Scout Neon buttons fill space to much

I think that there is a UI bug with buttons. I have buttons defined like with this :

@Override
protected boolean getConfiguredProcessButton() {

    return false;
}

@Override
protected boolean getConfiguredFillHorizontal() {

    return true;
}

but they fill the space to much, like shown in this picture :

enter image description here

Is this a bug, or I missing something?

Upvotes: 0

Views: 92

Answers (2)

Andre
Andre

Reputation: 178

By default all form-fields in Scout Html UI reserve some space on the right side, to display their (info-, error-) status or the context menu icon. I guess that's also the case with the table/group-box-title we see in your picture. Try IFormField#setStatusVisible(boolean) or override AbstractFormField#getStatusVisible().

A small hint: The table has it's own menu-bar. So I would rather add the "new row" action as a menu with menu-type 'EMPTY_SPACE' to the table and the "delete row" action as a menu with menu-type 'SINGLE/MULTI_SELECTION' instead of adding buttons to the form. Example:

public class SampleTable extends AbstractTable {

  @Order(10)
  public class NewMenu extends AbstractMenu {

    @Override
    protected Set<? extends IMenuType> getConfiguredMenuTypes() {
      return CollectionUtility.<IMenuType> hashSet(TableMenuType.EmptySpace);
    }

    @Override
    protected String getConfiguredText() {
      return TEXTS.get("New");
    }

    @Override
    protected void execAction() {
      // TODO: impl. new
    }
  }

  @Order(20)
  public class DeleteMenu extends AbstractMenu {

    @Override
    protected Set<? extends IMenuType> getConfiguredMenuTypes() {
      return CollectionUtility.<IMenuType> hashSet(TableMenuType.MultiSelection, TableMenuType.SingleSelection);
    }

    @Override
    protected String getConfiguredText() {
      return TEXTS.get("Delete");
    }

    @Override
    protected void execAction() {
      // TODO: impl. delete
    }
  }
}

For a full example check the TableFieldForm / AbstractFileTableField in the Scout demo application called "widgets". The application is hosted here:

https://github.com/BSI-Business-Systems-Integration-AG/org.eclipse.scout.docs/tree/releases/6.0.x/code/widgets

Upvotes: 1

mlu
mlu

Reputation: 91

yes, seems to be a bug, or at least I was able to reproduce this easily. Unfortunately I cannot give you a solution right away, I need to ask or try by myself first ;)

Best regards, Matthias

Upvotes: 0

Related Questions