Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 10 total
Thread Layout: Equivalent of Delphi's alClient alignment & responsive layout
Wed, Aug 19 2015 12:53 AMPermanent Link

AK

Hi folks

Just joined, loving EWB!

Quick questions on layout:

1.  alClient Alignment:
How do you layout a page (TForm) with "alClient" alignment and then put successive TBasicPanel components to fill up the page into grid-like boxes?

I've the the layout sample project, but it doesn't occupy the full browser surface.

2.  Liquid and Responsive Layout:
Is there a sample project that shows this?

Thanks in advance!

AK
Wed, Aug 19 2015 10:36 AMPermanent Link

Trinione

Hi AK,
The Layout Management help page is very informative. Here it is.

http://www.elevatesoft.com/manual?action=viewtopic&id=ewb2&topic=Layout_Management
Wed, Aug 19 2015 10:40 AMPermanent Link

Trinione

<< 2.  Liquid and Responsive Layout:
Is there a sample project that shows this? >>

Version 2.01, which we expect to be out soon, has Responsive layout ability.

Here is a sample page Tim put up a few weeks ago.

http://www.elevatesoft.com:8081/responsive/responsive.html
Wed, Aug 19 2015 11:40 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

AK,

<< Just joined, loving EWB! >>

Welcome ! Smile

<< 1.  alClient Alignment:
How do you layout a page (TForm) with "alClient" alignment and then put successive TBasicPanel components to fill up the page into grid-like boxes?

I've the the layout sample project, but it doesn't occupy the full browser surface. >>

Just set the form's Layout.Position to lpTopLeft and it's Layout.Stretch to lsBottomRight, and then the form will fill the entire browser window.  For the example application, you'll also want to modify this code:

procedure TMainForm.MainFormCreate(Sender: TObject);
begin
  Application.ViewPort.OverflowY:=otAuto;
  with Application.Surface do
     begin
     Constraints.Min.Height:=(Self.Height+40);
     Background.Fill.Color:=clElevateFillGray;
     end;
end;

so that it looks like this:

procedure TMainForm.MainFormCreate(Sender: TObject);
begin
  with Application.Surface do
     Background.Fill.Color:=clElevateFillGray;
end;

<< 2.  Liquid and Responsive Layout: >>

2.01 will have this, via a new Layout.Overflow property.

Tim Young
Elevate Software
www.elevatesoft.com
Wed, Aug 19 2015 3:39 PMPermanent Link

AK

Thanks Tim!  Got it.
Wed, Aug 19 2015 3:41 PMPermanent Link

AK

Trinione wrote:
>>http://www.elevatesoft.com:8081/responsive/responsive.html

Hi Trinione!

Thanks for that.  I'll attempt to replicated.

Just a small point:  I've just tested on my iPhone ... the scrolling when using the browser surface (as opposed the scroll bars) is a bit choppy.  Frown Is this just my mind?
Wed, Aug 19 2015 3:56 PMPermanent Link

AK

Damn, this is one clever piece of software.  Giggling like a kid in a toy shop.  Ideas are pouring out like crazy now. Haha!  

Well done guys, well done.
Thu, Aug 20 2015 11:47 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

<< Just a small point:  I've just tested on my iPhone ... the scrolling when using the browser surface (as opposed the scroll bars) is a bit choppy.  Frown Is this just my mind? >>

Are you expecting an inertia scroll ?  If so, then that's the reason.  Currently, EWB2 does not have inertia touch scrolling, just one-to-one linear scrolling.  It's a "gotcha" with doing touch handling in browsers - there's no way to do a "little of this, and some of that".  It's basically an all-or-nothing deal, so once we start hooking touch events in order to handle them, fire custom events, etc., we're now responsible for providing inertia scrolling animations.

Tim Young
Elevate Software
www.elevatesoft.com
Thu, Aug 20 2015 11:48 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

AK,

One other thing - there's a bug in 2.00 whereby touch scrolls aren't working correctly with respect to touching a non-scrollable control/element when trying to scroll a parent control/element (like the responsive layout), so you may see issues there, also.

Tim Young
Elevate Software
www.elevatesoft.com
Thu, Aug 20 2015 11:49 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

AK,

<< Damn, this is one clever piece of software.  Giggling like a kid in a toy shop.  Ideas are pouring out like crazy now. Haha!

Well done guys, well done. >>

Thanks. Smile

Tim Young
Elevate Software
www.elevatesoft.com
Image