Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » [neon] Problems spacing buttons in group box
[neon] Problems spacing buttons in group box [message #1732686] Thu, 19 May 2016 07:55 Go to next message
Urs Beeli is currently offline Urs BeeliFriend
Messages: 573
Registered: October 2012
Location: Bern, Switzerland
Senior Member
We have issues with a form in which 2 labels and 7 buttons are placed. The group box has a width of 1082 pixels. The buttons are spaced very far apart, so that only the first three are visible, the remaining for have "left" values that are greater than the group box width. We have not managed to make them visible in the group box.

We've opened a bug for this (its description contains more details and a code snippet): https://bugs.eclipse.org/bugs/show_bug.cgi?id=493976

Does anyone have an idea how to work around this issue?
Re: [neon] Problems spacing buttons in group box [message #1733574 is a reply to message #1732686] Mon, 30 May 2016 09:20 Go to previous messageGo to next message
Matthias Zimmermann is currently offline Matthias ZimmermannFriend
Messages: 208
Registered: June 2015
Senior Member
i have updated the bug with an alternative solution.

in case this works for you the proposal represents the clean solution of your requirement. in case there is a mis understanding please post a screenshot/mockup with what you need at the end.

tx for feedback
Re: [neon] Problems spacing buttons in group box [message #1734579 is a reply to message #1733574] Thu, 09 June 2016 13:49 Go to previous messageGo to next message
Urs Beeli is currently offline Urs BeeliFriend
Messages: 573
Registered: October 2012
Location: Bern, Switzerland
Senior Member
I'm copy-pasting my comment that I just added to the bug:

Quote:
Unfortunately this workaround does not fully solve our issues.

It does solve the immediate problem of wronlgy placing the buttons outside the visible field for the case outlined above. Using the SequenceBox, the buttons are equally spaced instead (which is not the behaviour we saw in SWT where the buttons were right aligned with no additional whitespace between them). However, we've managed to fiddle around with some config values to mimick the SWT behaviour. In essence the same fiddling also allowed us to mimick the behaviour using GroupBoxes, so changing from GroupBox to SequenceBox *does not* completely solve the spacing issue, it just converts it from "spacing outside visible gui" to "equidistant spacing".

However, a greater issue is a case where we are using different width fields. Using a GroupBox we were able to nicely space elements, but using the SequenceBox I have not been able to mimick this behaviour (even in Mars).

Another issue seems to be that we are able to change the font colour of the second field from black (initial value) to red, but any attempt at changing the colour back from red to black has no effect.

I am attaching a screenshot of what our current Mars based SWT GUI looks like and what our best effort in Neon has achieved.


Summarising:

  • I need to fiddle with various getConfiguredXxxx() properties in different ways between Mars and Neon to reproduce the same look and feel. When doing that, I can also get GroupBoxes to look very similar (a bit of spill on the right hand side, overlapping the last button with the scroll bar), so the SequenceBox is marginally better than the GroupBox but does not really avoid the issue that manual migration effort is needed to tweak the properties.
  • in a GroupBox we can mix various fields some, with configuredGridW > 1 and this looks quite nice (see the screenshot), changing the GroupBox to a SequenceBox leads to a totally broken layout. (also visible in the screenshot).
    Is there a recommended way to vary field widths of fields within a sequence box? It seems configuredGridW is not the way to go...

index.php/fa/26139/0/

[Updated on: Thu, 09 June 2016 13:48]

Report message to a moderator

Re: [neon] Problems spacing buttons in group box [message #1734954 is a reply to message #1734579] Tue, 14 June 2016 06:16 Go to previous messageGo to next message
Urs Beeli is currently offline Urs BeeliFriend
Messages: 573
Registered: October 2012
Location: Bern, Switzerland
Senior Member
Matthias Zimmermann suggested that I set GridW of the Sequence Box to 6 (the number of columns in the containing GroupBox.

I've tried a different approach: Instead of replacing the GroupBox of the last line with a SequenceBox, I left the GroupBox untouched but added a SequenceBox to the GroupBox just for the Buttons and now all looks fine.
Re: [neon] Problems spacing buttons in group box [message #1735066 is a reply to message #1734954] Wed, 15 June 2016 08:32 Go to previous message
Claudio Guglielmo is currently offline Claudio GuglielmoFriend
Messages: 256
Registered: March 2010
Senior Member
Just for clarification:

  • The default of gridUseUiWidth was changed from true to false for buttons. That is why you had the space between the buttons. I updated the migraton guide accordingly: http://eclipsescout.github.io/6.0/migration-guide.html#button.
  • The groupbox uses a gridW of FULL_WIDTH by default, compared to the sequencebox which uses a gridW of 1, like a regular form field. That is why you need so set the gridW manually if you use a sequence box.
Previous Topic:[neon] [oomph] import Demo app - auth failed
Next Topic:[neon] problem with table formdata
Goto Forum:
  


Current Time: Fri Apr 26 21:35:43 GMT 2024

Powered by FUDForum. Page generated in 0.03808 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top