0
votes

In Scout Eclipse with every field comes label for it. But my problem is that is a lot of free space there and because of that fields are smaller that they should be.

For example : enter image description here

I tried :

  • To set label width in pixel: It works, but you should set and calculate it for every field and you can forget about translations, because text don't have same size in other languages.

  • To set Label Horizontal Alignment to Right - text is positioned by fields but then free space is on the left side.

How to handle that?

P.S. I don't need label without any free space, but with smaller one.

EDIT :

With spy tool it look like :

enter image description here

1
I do not understand how your grid is built. Can you add a second screenshot with the grid overlay? CTRL-SHIFT-F2 wiki.eclipse.org/Scout/Concepts/Spy#Layout_DebuggerJmini
Hy,.. How do I do it on a mac?Marko Zadravec
I found something but it doesn't look like demo.Marko Zadravec
Is it possible for you to send us the client code you are using? Is the screenshot a part of a TabBox? I guess the additional lines created by the layout debugger are created because of the tabs.Jmini

1 Answers

0
votes

I have no idea what your problem really is, here some generic advices I can give you (based on some guesses I have made. I will be happy to extend this answer, when I know more about your use case).

From-To fields:

When you have 2 fields for “From” and “To”, a good practice is to use a sequence box.

Here an example for a “from-to date” sequence box (taken in the Widgets Demo Application):

@Order(50.0)
public class DateBox extends AbstractSequenceBox {

  @Override
  protected String getConfiguredLabel() {
    return TEXTS.get("DateColumn");
  }

  @Order(10.0)
  public class DateFrom extends AbstractDateField {

    @Override
    protected String getConfiguredLabel() {
      return TEXTS.get("from");
    }
  }

  @Order(20.0)
  public class DateTo extends AbstractDateField {

    @Override
    protected String getConfiguredLabel() {
      return TEXTS.get("to");
    }
  }
}

Money field:

We have discussed how you can combine an amount and currency field in a sequence box in order to look like this.

Sequence Box - Money Field

See this solution: Amount and currency field.