Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 1 of 1 total
Thread OnShow not firing
Mon, Dec 19 2016 4:51 PMPermanent Link

Michel

Interval Software


Hello everyone,

I am having a problem with TForm.OnShow not firing with ShowModal method.

I checked out this thread, but it did not help me.

http://www.elevatesoft.com/forums?action=view&category=ewb&id=ewb_beta&msg=141&start=1&keywords=onshow%20showmodal&searchbody=True&forum=EWB_Announce&forum=EWB_General&forum=EWB_Components&forum=EWB_Server&forum=EWB_Demos&forum=EWB_Binaries&forum=EWB_Discussion&forum=EWB2_Preview&forum=EWB_Beta#141

It is pretty straight forward. I have a class derived from TForm and the constructor does,

constructor TGenericDialog.CreateStatic( const DialogClose : TGenericDialogClose );
begin
   inherited Create(Application);
   Self.OnShow                     := Self.FormShow;
   ....

and the OnShow handler,

procedure TGenericDialog.FormShow(Sender : TObject);
begin
   window.alert('form show');
   ....

I am creating the form and calling ShowModal:

   FCreateAccountForm    := TGenericDialog.CreateStatic(CreateAccountDone);
   FCreateAccountForm.AddButton( 'Back', '', False );
   FCreateAccountForm.ShowModal;

I need an event that triggers just after ShowModal.

Any ideas what I'm doing wrong?

Thanks,

Michel
Image