Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 10 total
Thread Layouts
Fri, May 1 2015 5:55 AMPermanent Link

Matthew Jones

Tim,

Don't respond here, but I think the documentation for layouts will need
to have a few well diagrammed examples so that we can understand the
steps needed to make common layouts.

I have tried, and for now failed, to set up a form with a panel at the
top as the header, a panel at the bottom as a footer, and a page
control as the main, scalable content, and another panel on the right
with a sizer for optional info. I suspect I probably need another panel
as parent for the middle items, but what I need is to be able to hit F1
in the layout properties and have the help show me a diagram for how to
achieve what I need.

I can see that this is going to save a lot of fiddly layout
programming, but there is a learning curve.

Thanks, Matthew
Fri, May 1 2015 7:22 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Matthew,

<< Don't respond here, but I think the documentation for layouts will need
to have a few well diagrammed examples so that we can understand the steps
needed to make common layouts. >>

There will be, though please keep in mind that the docs are going to be a
little thinner than I want in the initial release.  There's just a lot of
ground to cover in a small amount of time, so I'm going to have to build on
things as it rolls on.

<< I have tried, and for now failed, to set up a form with a panel at the
top as the header, a panel at the bottom as a footer, and a page control as
the main, scalable content, and another panel on the right with a sizer for
optional info. >>

I've attached what you need (hopefully it works for you - I've changed a lot
since the last build).  However, be warned that there was a bug in the
TSizer control when it came to resizing controls that were to the *right* of
the sizer.  It was doing things backward, but it's been fixed for the final
release.

<< I suspect I probably need another panel as parent for the middle items,
>>

Nope, don't need such things with EWB 2. Smile

Tim Young
Elevate Software
www.elevatesoft.com



Attachments: LayoutTest.wbp Unit1.wbf Unit1.wbs
Fri, May 1 2015 8:06 AMPermanent Link

Matthew Jones

Tim Young [Elevate Software] wrote:

> << I have tried, and for now failed, to set up a form with a panel at
> the top as the header, a panel at the bottom as a footer, and a page
> control as the main, scalable content, and another panel on the right
> with a sizer for optional info. >>
>
> I've attached what you need (hopefully it works for you - I've
> changed a lot since the last build).  However, be warned that there
> was a bug in the TSizer control when it came to resizing controls
> that were to the right of the sizer.  It was doing things backward,
> but it's been fixed for the final release.

This is indeed perfect. Made me laugh that you had it so simply, and I
was blundering. I shall study this to work it out. Thank you.
Fri, May 1 2015 8:22 AMPermanent Link

Matthew Jones

Matthew Jones wrote:

> I shall study this to work it out.

Okay, the thing that I was missing was the Layout order. Quite obvious
really, but I was figuring that it would be top/middle/right/bottom as
my components went visually top to bottom, but of course that is not
what I was actually wanting, which is top, bottom, right, middle.
Literally, to set the order that things are positioned, and then it all
falls into place as you expect.

So, big lesson here is that the layout is done in the order of the
component's LayoutOrder property, zero being the first.

Sounds so obvious, but I didn't get it right.
Fri, May 1 2015 2:46 PMPermanent Link

Jim Gallagher

"Matthew Jones" wrote:

> Sounds so obvious, but I didn't get it right.

Thanks for asking the question Matthew.  I've been trying to keep quiet until the release, but I was agonizing over not understanding the "layout" (still not sure what "consumption" means).  A working example goes a LONG way for me.

-Jim
Fri, May 1 2015 6:05 PMPermanent Link

Chris Holland

SEC Solutions Ltd.

Avatar

Team Elevate Team Elevate

Jim Gallagher <> Wrote in message:
> "Matthew Jones" wrote:
>
>> Sounds so obvious, but I didn't get it right.
>
> Thanks for asking the question Matthew.  I've been trying to keep quiet until the release, but I was agonizing over not understanding the "layout" (still not sure what "consumption" means).  A working example goes a LONG way for me.
>
> -Jim
>
>

Hi Jim,

If you drop a component with layout 1 on a form and set the
consumptionto be Right then when you drop another component with
layout 2 it will appear to the right of the original component.
If the original component had consumption set to bottom the next
component will appear below it.

--
Chris Holland


----Android NewsGroup Reader----
http://usenet.sinaapp.com/
Sat, May 2 2015 12:31 AMPermanent Link

Jim Gallagher

Chris Holland wrote:

>If you drop a component with layout 1 on a form and set the consumption
>to be Right then when you drop another component with
> layout 2 it will appear to the right of the original component.

OK, it seems to do that, as long as the second component has "position" set. If I set basicPanel1.Consumption to "right" and basicPanel2.Position to "left" it jams the second component up against the right edge of the first.  If I set basicPanel1.Consumption to "none" the second component jams up against the left edge of the parent form.  

I'm slowly catching on - there's a sweet spot with LayoutOrder, Consumption, Position and Stretch for everything I want to do, and at first everything I tried seemed to send the component to another dimension reachable only by the object inspector, but I think I'm starting to get the hang of it.  

Thanks for your help Chris (and Matthew, and of course Tim).

-Jim
Sat, May 2 2015 8:13 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Jim,

One thing to know is that in the build that you have, when Position=ptNone,
the control/element will *not* participate in the layout in terms of
positioning (it will be absolutely-positioned and will ignore any other
space consumption that has taken place prior to it in the layout order).
I've since changed this so that Position=ptNone will still have the
control/element participate in the layout - it will just use the
control/element's Left/Top property settings to determine *where* in the
available space the control will be positioned.

I've added an example project that shows how you would do a layout using the
various property settings.

http://www.elevatesoft.com:8081/layout/layout.html

Hopefully that helps shed some light on how things work.

Tim Young
Elevate Software
www.elevatesoft.com
Sat, May 2 2015 12:22 PMPermanent Link

Jim Gallagher

"Tim Young [Elevate Software]" wrote:

>http://www.elevatesoft.com:8081/layout/layout.html

>Hopefully that helps shed some light on how things work.

Yes!  That is perfect, thanks.  I don't know if it's intentional that only the upper right red panel has reset=true. Seriously, I only mention it in case it wasn't intentional.  I will happily wait for the release for documentation and continue playing around with what I have now.  I'm having a great time, and I think that Release 2 is going to be hugely successful, once the word gets out.

-Jim
Sun, May 3 2015 8:25 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Jim,

<< Yes!  That is perfect, thanks.  I don't know if it's intentional that
only the upper right red panel has reset=true. Seriously, I only mention it
in case it wasn't intentional. >>

The Reset property (in conjunction with the Consumption property) is how you
do flow layouts in EWB 2. Smile Imagine a Z pattern for the red panels from
top to bottom, and you get the idea....

<< I will happily wait for the release for documentation and continue
playing around with what I have now.  I'm having a great time, and I think
that Release 2 is going to be hugely successful, once the word gets out. >>

Thanks, I hope you're right. Smile

Tim Young
Elevate Software
www.elevatesoft.com
Image