Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 8 of 8 total
Thread Amazing Form Embedding
Sat, Aug 10 2013 12:39 PMPermanent Link

Franck - Midi pyrénées - France

Esteves Ducilia

Avatar

Hello there,

The example Form Emedding is very amazing. I wonder what is the method to do that.
It seems to be a form created in a panel . That I think it's not possible, isn't it ?
Am i the only one to be suprised of that.
Mon, Aug 12 2013 6:15 AMPermanent Link

Matthew Jones

It is good, but it appears to be done with nothing particularly hard having had a
look at the code. I guess the magic is done in the framework, but it shows just how
"like VCL" the code is really - HTML5 ain't no table based layout any more!

/Matthew Jones/
Mon, Aug 12 2013 5:47 PMPermanent Link

Steve Gill

Avatar

I have been using an embedded form as a menu for page navigation.  If you turn off borders it looks like it's part of the page.  Works pretty good.

-Steve
Tue, Aug 13 2013 3:27 AMPermanent Link

Franck - Midi pyrénées - France

Esteves Ducilia

Avatar

Morning,

I was very simple. I'm just discovering properties of the panel. It is possible to setup a panel like a form.
Tue, Aug 13 2013 9:10 AMPermanent Link

Dan

Fiscalsoft

On 8/12/2013 5:47 PM, Steve Gill wrote:
> I have been using an embedded form as a menu for page navigation.  If you turn off borders it looks like it's part of the page.  Works pretty good.
>
> -Steve
>
Steve,
Would you mind sharing what you did exactly?  I'm trying to work out
different ways to create nav menus myself and could use more ideas.  Thanks

Dan
Tue, Aug 13 2013 5:24 PMPermanent Link

Steve Gill

Avatar

Hi Dan,

<< Would you mind sharing what you did exactly?  I'm trying to work out
different ways to create nav menus myself and could use more ideas.  Thanks  >>

Sure.  I'll create an example and post it here.
Wed, Aug 14 2013 1:21 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Franck,

<< The example Form Emedding is very amazing. I wonder what is the method to
do that. It seems to be a form created in a panel . That I think it's not
possible, isn't it ? Am i the only one to be suprised of that. >>

All you need to do is this:

procedure TMainForm.CreateButtonClick(Sender: TObject);
var
  TempForm: TEmbeddedForm;
begin
  TempForm:=TEmbeddedForm.Create(DockPanel);
  TempForm.Show;
end;

Just pass in the panel that you wish to dock the form into as the
Owner/Parent parameter to the TForm.Create method, and make sure to show the
form to make it visible.  It's that simple.

You can also dynamically alter the Parent property of the form at runtime to
un-dock/re-dock the form into other panels.

Finally, you can use the TForm.Dock property to control how the form fills
the host panel when you dock it.

Tim Young
Elevate Software
www.elevatesoft.com


Wed, Aug 14 2013 5:31 PMPermanent Link

Steve Gill

Avatar

Hi Dan,

As Tim said, it's pretty simple to implement.  All of the heavy lifting is done by the framework. Smile I have attached a very simple test project I was playing around with to see how I could do a common menu for another app.  Nothing much to it really.

-Steve



Attachments: MyEmbeddedFormTest.zip
Image