Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » scout » Solving layout problems using grid column count and other properties
Solving layout problems using grid column count and other properties [message #524084] Tue, 30 March 2010 15:49
Alex Schroeder is currently offline Alex Schroeder
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  | |
|                                                      +--------+ +---------+ |
+-----------------------------------------------------------------------------+


After some experimenting we arrived at the following solution:


  1. Anonymous Group is just a group box with no name with type TopGroup or whatever takes your fancy.
  2. 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.
  3. Column 1 also has a Grid W of 1 because it takes up one column on the dialog.
  4. 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.
  5. 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!) Smile

[Updated on: Tue, 30 March 2010 15:51]

Report message to a moderator

Previous Topic:Behaviour of disabled form fields
Next Topic:Solving layout problems using grid column count and other properties
Goto Forum:
  


Current Time: Thu Sep 18 01:43:48 GMT 2014

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

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