Icon View Thread

The following is the text of the current message along with any replies.
Messages 11 to 15 of 15 total
Thread Embedded Forms
Mon, Oct 29 2007 12:48 PMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Matthew


That was my first thought - didn't work. What I'm doing now is sending a custom message to the form which in turn fires the FormActivate event - cacky but it works.

Roy Lambert
Mon, Oct 29 2007 2:08 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< I've just discovered one problem with the embedded forms approach -
FormActivate doesn't fire. What do you do about that? >>

I don't use it, so I didn't run into that issue. Smiley

--
Tim Young
Elevate Software
www.elevatesoft.com

Tue, Oct 30 2007 12:57 AMPermanent Link

HJ
Roy Lambert wrote:
> Tim
>
>
> I've just discovered one problem with the embedded forms approach - FormActivate doesn't fire. What do you do about that?

Sorry to jump in. May be I'm wrong but I found, if the PageControl have
a close button, FormClose also not fire when I close the tab by clicking
the close button. I'm using DevEx's PageControl.

>
> Roy Lambert
>

HJ
Tue, Oct 30 2007 4:48 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

HJ


I'm using TMS and the FormClose event does fire when I click the close button - here's the code I'm using

procedure TMainForm.FormControllerClosePage(Sender: TObject; PageIndex: Integer; var Allow: Boolean);
var
Cntr: integer;
TagNo: integer;
begin
TagNo := FormController.ActivePage.Tag;
Allow := TagNo > tagCallbacks;
if FormController.Tag = 1 then begin
 for Cntr := 0 to Application.ComponentCount - 1 do begin
  if (Application.Components[Cntr] is TForm) and (TForm(Application.Components[Cntr]).Tag > 0) then begin
   if TForm(Application.Components[Cntr]).Parent = FormController.ActivePage then begin
    TForm(Application.Components[Cntr]).Close;
   end;
  end;
 end;
 if (not Allow) and (not IsCreated[TagNo]) then begin
  SwitchCloseForOpen;
 end;
end else begin
 LoadPrimaryForm(TagNo, False);
end;
end;

I use the button to close the form if its created, and create it if it isn't


Roy Lambert
Tue, Oct 30 2007 8:30 AMPermanent Link

HJ
Roy Lambert wrote:

My fault, I don't write a Close method Frown

Thanks.
HJ
« Previous PagePage 2 of 2
Jump to Page:  1 2
Image