Marko Zadravec
Marko Zadravec

Reputation: 8740

Eclipse Scout Lable in save "row" as buttons

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.

Upvotes: 0

Views: 111

Answers (1)

Jmini
Jmini

Reputation: 9507

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.

Upvotes: 1

Related Questions