Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » scout » Layout Management(Management position fields on the form in Scout)
Layout Management [message #1015540] Fri, 01 March 2013 08:06 Go to next message
marco giudici is currently offline marco giudiciFriend
Messages: 152
Registered: February 2013
Location: Italy
Senior Member
Hi,
I'm again here with a new problem.
This time my problem is organizing the layout of a form, in my form I have many fields (text, checkbox, smart field) divided by different group box. Some of these group box are within other.
My problem is that I cannot sizing correctly the fields and especially they overlap (see image as example)
index.php/fa/13623/0/

I tried various combinations of the following properties:
- Fill Horizontal
- Grid X
- Grid Y
- Grid Weight X
- Grid Use UI Width
- Width In Pixel

Thanks in advance for help
  • Attachment: Layout.png
    (Size: 7.97KB, Downloaded 291 times)
Re: Layout Management [message #1015570 is a reply to message #1015540] Fri, 01 March 2013 09:13 Go to previous messageGo to next message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 795
Registered: October 2011
Senior Member
I agree that there is a lot of configuration possibility and not all of them are fully explainded... I will try to provide some information on the properties.

---

For your example: can you provide some code snippets and the result you want to optain?

---

Related topic:
* Layout examples
Re: Layout Management [message #1015583 is a reply to message #1015570] Fri, 01 March 2013 09:39 Go to previous messageGo to next message
marco giudici is currently offline marco giudiciFriend
Messages: 152
Registered: February 2013
Location: Italy
Senior Member
Hi,
this is an example of layout that I want obtain:
index.php/fa/13628/0/
Re: Layout Management [message #1015965 is a reply to message #1015583] Mon, 04 March 2013 12:35 Go to previous messageGo to next message
Stathis Alexopoulos is currently offline Stathis AlexopoulosFriend
Messages: 42
Registered: September 2010
Member
Hello Marco,

Your layout is fantastic, but a little bit complicated for a newcomer. I would suggest to experiment with parts of it in differenet forms, and when you have some experience, try again to build it as a whole.

The mentioned practice will help you also in the final product, if you want to use the templates.

There are around 20 fields in your forms. The formatting code for them with grouping and the Controller part of MVC if you want to have some interaction such as calculating some of them according the values specified to others or you want to do some kind of validation, it will easily result in a 1000 or more lines.

A better approach is to design and implement separately the "base curve" for example and after that create a template e.g. BaseCurveGroupField. Finally create a form using all of the created templates.

In that way you will have a more maintanable source code.


Although it is not an answer, i hope that could help.
Re: Layout Management [message #1015967 is a reply to message #1015965] Mon, 04 March 2013 12:46 Go to previous messageGo to next message
marco giudici is currently offline marco giudiciFriend
Messages: 152
Registered: February 2013
Location: Italy
Senior Member
Hi Stathis,
thank you very much for your suggestion ... I honestly had not thought to define various templates and then integrate them into a single form.
Have you some examples to clarify to me better ideas? Or can you suggest me some link about this idea?

For my bad luck, the image reported is only one part of a complex form that required in my project.
Re: Layout Management [message #1016000 is a reply to message #1015967] Mon, 04 March 2013 14:56 Go to previous messageGo to next message
Stathis Alexopoulos is currently offline Stathis AlexopoulosFriend
Messages: 42
Registered: September 2010
Member
Hi Marcus again,

It is not so difficult, to produce the layout you want as you can see in the next image.
index.php/fa/13661/0/
It just needs some experiments for various situations.
index.php/fa/13662/0/

I have attached part of the code that produced it. And as you can see , i have created three example templateFields.

Hope it helps.
Re: Layout Management [message #1016006 is a reply to message #1016000] Mon, 04 March 2013 15:17 Go to previous messageGo to next message
marco giudici is currently offline marco giudiciFriend
Messages: 152
Registered: February 2013
Location: Italy
Senior Member
Hi Stathis,
first of all thank you for this example. Now I study your code and try to figure out where mistake.
Re: Layout Management [message #1016060 is a reply to message #1016006] Mon, 04 March 2013 18:50 Go to previous messageGo to next message
Stathis Alexopoulos is currently offline Stathis AlexopoulosFriend
Messages: 42
Registered: September 2010
Member
Hi Marco,

There are no mistakes, Just unfinished configuration of fields. You have to take care for the configuration of each field indivindually. I used some configuration options of Scout such as getConfiguredLabelPosition(), getConfiguredWidthInPixel(), getConfiguredGridColumnCount() for demo purposes. I also created three example templates.

The rest its up to you.
Re: Layout Management [message #1016121 is a reply to message #1016060] Tue, 05 March 2013 07:17 Go to previous messageGo to next message
Urs Beeli is currently offline Urs BeeliFriend
Messages: 341
Registered: October 2012
Location: Bern, Switzerland
Senior Member
Marco

One thing you might want to look into is something that I failed to realise when I first started working on more complex scout windows: The layout manager used will always try to "stretch" your fields to make use of the available window/form size. This is controlled by the "Fill Horizontal" and "Fill Vertical" checkboxes in the advanced properties. If you want pixel-precise field sizes, it won't be enough to set "Width/Height In Pixel", you will also need to deselect the two "Fill" checkboxes.

Another thing that helps me to manage layouts is to liberally use group boxes (you can hide their borders, so they're invisible) to avoid unwanted wrapping of fields to the next row or column.
Re: Layout Management [message #1016131 is a reply to message #1016121] Tue, 05 March 2013 07:56 Go to previous message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 795
Registered: October 2011
Senior Member
@All:
Thanks a lot for sharing here. I take note of all your valuable feedback.
Previous Topic:Multi-threading issue when using Scout Swing client
Next Topic:Form Validation
Goto Forum:
  


Current Time: Wed Nov 26 05:51:41 GMT 2014

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

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