Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » Solving layout problems using grid column count and other properties
Solving layout problems using grid column count and other properties [message #579647] Tue, 30 March 2010 15:49
Alex Schroeder is currently offline Alex SchroederFriend
Messages: 38
Registered: February 2010
Location: Zürich, Switzerland
Member

Somebody just came to my desk and asked me how to achieve the following layout for a prototype they're doing for a customer.


+-Dialog---------------------------------------------------- ------------------+
| +-Anonymous Group------------------------------------------------------- --+ |
| | +-------------------+ +---------------------+ | |
| | Field 1 | | Field 2 | | | |
| | +-------------------+ +---------------------+ | |
| +----------------------------------------------------------- --------------+ |
| +-Column 1-----------------------+ +-Column 2-----------------------------+ |
| | +-----------------+ | | +---------------------+ | |
| | Field 3 | | | | Field 6 | | | |
| | +-----------------+ | | +---------------------+ | |
| | +-----------------+ | | +---------------------+ | |
| | Field 4 | | | | Field 7 | | | |
| | +-----------------+ | | +---------------------+ | |
| | +-----------------+ | +--------------------------------------+ |
| | Field 5 | | | +-----------------------+ |
| | +-----------------+ | Field 8 | | |
| +--------------------------------+ +-----------------------+ |
| |
| +--------+ +---------+ |
| | Ok | | Cancel | |
| +--------+ +---------+ |
+----------------------------------------------------------- ------------------+

Here's how:



Anonymous Group is just a group box with no name with type TopGroup or whatever takes your fancy.
Column 1 is a another group box with Grid Column Count 1 because we want Fields 3, 4, and 5 to be in a single column.
Column 1 also has a Grid W of 1 because it takes up one column on the dialog.
Column 1 also has a Grid H of at least 3 because that's how many rows it takes in the layout. The framework will accept larger values, but smaller values or the default lead to breakage.
Column 2 same thing: Grid Column Count 1, Grid W 1, Grid H at least 2.


I'm still not quite happy with the alignment on pixel-level. It's good enough for a prototype. What do you think, are those small misalignments worth a bug report?

(Personally I also think that it's bad style to leave Field 8 outside a frame, but that's what the spec of the prototype said, so I'm not going to argue. They still have time to see the errors of their ways!) :)
Previous Topic:Solving layout problems using grid column count and other properties
Next Topic:AbstractComposerAttribute.getConfiguredStatement
Goto Forum:
  


Current Time: Fri Dec 13 19:31:35 GMT 2024

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

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

Back to the top