Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 9 of 9 total
Thread ShowMessage not centred
Thu, Jul 2 2015 11:05 PMPermanent Link

StewCam

My EWB2 application resizes appropriately. However, ShowMessage appears centred on the right edge of the viewport and not in the centre of the browser window. I tried adjusting Application.Surface with no effect. I can get around this by using a form instead with some code such as:

 FormAbt.Left := Round(Application.Viewport.Width/2 - FormAbt.Width/2);
 FormAbt.Top := Round(Application.Viewport.Height/2- FormAbt.Height/2);

I would appreciate advice on how to resolve this issue with ShowMessage.
Fri, Jul 3 2015 12:35 AMPermanent Link

Steve Gill

Avatar

I'm having the same problem.  Message dialogs are displaying below the bottom of the screen.  Only the top half of the dialog is visible.

= Steve
Fri, Jul 3 2015 8:24 AMPermanent Link

StewCam

Yes, I have the same problem as before when trying a MessageDlg (i.e., dialog is centred on the right edge of the viewport. Also, when loading the output from a live server, error messages are similarly affected. I presume this has something to do with layouts, but I cannot see where to fix it.
Fri, Jul 3 2015 11:19 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com


<< My EWB2 application resizes appropriately. However, ShowMessage appears
centred on the right edge of the viewport and not in the centre of the
browser window. >>

Did you adjust the size/layout of the Application.Surface ?  Message dialogs
are placed relative to the application surface, because they are children of
it.

Tim Young
Elevate Software
www.elevatesoft.com
Sat, Jul 4 2015 5:32 AMPermanent Link

StewCam

In the end the problem was not due to a setting of Application.Surface. It was caused by the main form Layout.Consumption property being set to lcRight and was resolved when this was changed to lcNone. I guess Steve's problem above is caused by the property being set to lcBottom.
Mon, Jul 6 2015 1:28 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com


<< In the end the problem was not due to a setting of Application.Surface.
It was caused by the main form Layout.Consumption property being set to
lcRight and was resolved when this was changed to lcNone. I guess Steve's
problem above is caused by the property being set to lcBottom. >>

Yes, this should have been mentioned more prominently in the manual.  You
absolutely *do not* want to use a layout consumption with forms, unless you
really want to limit the layout space for subsequent forms on the
application surface (which is normally "never").

Tim Young
Elevate Software
www.elevatesoft.com
Mon, Jul 6 2015 8:14 PMPermanent Link

Steve Gill

Avatar

<< Yes, this should have been mentioned more prominently in the manual.  You
absolutely *do not* want to use a layout consumption with forms, unless you
really want to limit the layout space for subsequent forms on the
application surface (which is normally "never"). >>

Thanks Tim and StewCam, I did have the form consumption set to lcBottom. I changed it to lcNone and it now works as advertised.

= Steve
Tue, Jul 7 2015 1:47 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Steve,

<< Thanks Tim and StewCam, I did have the form consumption set to lcBottom.
I changed it to lcNone and it now works as advertised. >>

I know that you're now using the browser scrollbars, but there was one other
little bug in the scrollbar handling for the application surface:  the
bounds determination for the scrolling was using hidden controls/forms in
its calculation.  This will be fixed in the next build/minor release.

Tim Young
Elevate Software
www.elevatesoft.com
Tue, Jul 7 2015 7:16 PMPermanent Link

Steve Gill

Avatar

<< I know that you're now using the browser scrollbars, but there was one other
little bug in the scrollbar handling for the application surface:  the
bounds determination for the scrolling was using hidden controls/forms in
its calculation.  This will be fixed in the next build/minor release. >>

Thanks Tim.

= Steve
Image