Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 8 of 8 total
Thread OnResize event in Forms
Fri, Jan 18 2013 11:48 AMPermanent Link

Uli Becker

As long as EWB does not have anchors and align-properties: can we have
an "OnResize" event in TForm?

That would help...

Thanks Uli
Fri, Jan 18 2013 11:53 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Uli,

<< As long as EWB does not have anchors and align-properties: can we have an
"OnResize" event in TForm? >>

I'll be doing all of them at once, but I'll see if I can come up with
something sooner.  But, frankly, I really need to get off  the
stop..start..stop..start development cycle that I'm currently on, due to
constantly trying to work features in "one-at-a-time".  It's not very
productive. Frown

Tim Young
Elevate Software
www.elevatesoft.com
Fri, Jan 18 2013 1:04 PMPermanent Link

Uli Becker

Tim,

> I'll be doing all of them at once, but I'll see if I can come up with
> something sooner.  But, frankly, I really need to get off  the
> stop..start..stop..start development cycle that I'm currently on, due to
> constantly trying to work features in "one-at-a-time".  It's not very
> productive. Frown

No problem - I was just looking for an easy way (also easy for you) to
align components on a form that is embedded in the main form.
Don't feel pushed, please!

Thanks Uli


Mon, Jan 21 2013 10:15 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Uli,

<< No problem - I was just looking for an easy way (also easy for you) to
align components on a form that is embedded in the main form.  Don't feel
pushed, please! >>

Not at all.  It's more of a self-discipline thing. I find myself constantly
saying "well, this one little thing won't take long....". Smile

Thanks,

Tim Young
Elevate Software
www.elevatesoft.com
Mon, Jan 21 2013 11:06 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tim


>Not at all. It's more of a self-discipline thing. I find myself constantly
>saying "well, this one little thing won't take long....". Smile

I needed that. Brilliant way to start the week <vbg>

Roy
Mon, Jan 21 2013 11:09 AMPermanent Link

Matthew Jones

Funny you should mention that, as I thought an event would be good, but did it
anyway in code. Is that not thought possible yet then?

procedure TForm1.UpdateLayout(Sender: TObject);
begin
   Width := Application.Desktop.Width;
   Height := Application.Desktop.Height;
   pageBrowser.Width := ClientWidth - pageBrowser.Left - 8;
   pageBrowser.Height := ClientHeight - pageBrowser.Top - 12;
end;

procedure TForm1.Show(Sender: TObject);
begin
   UpdateLayout(nil);
   Application.Desktop.OnResize := UpdateLayout;
end;


/Matthew Jones/
Mon, Jan 21 2013 11:32 AMPermanent Link

Uli Becker

Matthew;

> procedure TForm1.UpdateLayout(Sender: TObject);
> begin
>      Width := Application.Desktop.Width;
>      Height := Application.Desktop.Height;
>      pageBrowser.Width := ClientWidth - pageBrowser.Left - 8;
>      pageBrowser.Height := ClientHeight - pageBrowser.Top - 12;
> end;
>
> procedure TForm1.Show(Sender: TObject);
> begin
>      UpdateLayout(nil);
>      Application.Desktop.OnResize := UpdateLayout;
> end;

Sure, I am using a similar code. But if you have several (embedded)
forms open, it doesn't help to update all forms.

Though you can create an "UpdateLayout" procedure for each form and use
a general OnResize procedure in your Main form that calls all these.

Uli
Mon, Jan 21 2013 12:08 PMPermanent Link

Matthew Jones

Ah, okay, that's a nuance I'd not realised. Thanks. I must try multiple forms...

/Matthew Jones/
Image