0

I would like to know how to put LabelField in same line as Buttons in Eclipse Scout.

Despite Grid X,Y you put for fields, scout always put buttons at the bottom in "extra" line and even if you put Label and button at the same Y grid property buttons would be one line below Label.

I have some status text to display and it would be nice to put it in same line as buttons. How you do this.

Marko Zadravec
  • 8,298
  • 10
  • 55
  • 97

1 Answers1

1

For Froms:

At the button of the form, you have a space for Buttons having the property IButton.isProcessButton() == true:

I am not sure you can something else in this area. The grid for the fields (and for the buttons not set as process buttons) is in an other area. Here a screenshot (with the layout debugger):

Simple Form with Eclipse Scout

The Table has the properties:

  • GridH == 5
  • GridW == 2

The Test button is not a process button.

The OK and Cancel buttons are process button


For Pages:

For pages, the situation is a little bit different, you can use IPage.setPagePopulateStatus(IProcessingStatus) to set a status line. This will be interpreted by the form containing the content of the page and added at the bottom of the form.

Desktop window - Eclipse Scout

Here some examples:

  @Override
  protected void execPageActivated() throws ProcessingException {
    setPagePopulateStatus(new ProcessingStatus("Activated: " + new java.util.Date(), IStatus.INFO));
  }

or:

@Override
  protected void execPageDataLoaded() throws ProcessingException {
    setPagePopulateStatus(new ProcessingStatus("Loaded: " + new java.util.Date(), IStatus.WARNING));
  }

And this one for table pages:

  @Override
  protected void execPageDataLoaded() throws ProcessingException {
    setPagePopulateStatus(new ProcessingStatus("Data loaded: " + new java.util.Date(), IStatus.INFO));
  }

Of course, like for each text displayed in the UI, it would be better to use TEXTS.get(..) instead of String directly.

Jmini
  • 9,189
  • 2
  • 55
  • 77
  • Thanks, this explain a lot. But what is than right way to have status label (status bar) on form/page? – Marko Zadravec Oct 03 '14 at 11:33
  • I have added some examples to demonstrate how to set a status bar on a page. – Jmini Oct 06 '14 at 05:51
  • This function does nothing on my page. I try it on table page and page with table and neither work. – Marko Zadravec Oct 06 '14 at 06:33
  • I do not know why it is not working for you (with Pages). You see the line in my screenshot (Version Luna, Swt UI). What are you using? – Jmini Oct 07 '14 at 08:20
  • I use Swing client (Luna), but I think, this shouldn't be the problem. The program runs, but I don't see line with text. Do I have to enabled something? – Marko Zadravec Oct 07 '14 at 10:29
  • Ok I tried it with Swing (Nibus LaF) and I have the line. I am using an Outlined based Application. As I told, this is for Pages only. The Line is added into the Status Line of the Table Field. I do not know what is going on in your case. – Jmini Oct 09 '14 at 11:31