IWAppFormResize not updating properties

<< Click to Display Table of Contents >>

Navigation:  Forum >

IWAppFormResize not updating properties

Forum link

 


 

11-29-2022, 02:31 PM:

 

Hello!

 

I put a TIWButton on a form. In the IWAppFormResize event I execute:

 

Procedure TScreenInterfaceForm.IWAppFormResize(Sender: TObject);

 

Begin

 

   IWButton13.Caption := FormatDateTime('hh:nns', Now);

 

End;

 

When I'm resizing the form nothing changes on the button even as I can see that the event is executed!? 

 

But if I add a click event to the button and execute the same code it is updated.

 

procedure TScreenInterfaceForm.IWButton13Click(Sender: TObject);

 

begin

 

IWButton13.Caption := FormatDateTime('hh:nns', Now);

 

end;

 

Whats the difference? Why does changed to properties not reflect on screen? Do I have to invalidate or refresh for changes to be sent to screen?

 

Best regards, Mikael

 

 

 

I also tried to solve this with a timer:

 

Procedure TScreenInterfaceForm.IWAppFormResize(Sender: TObject);

 

Begin

 

   IWTimer1.Enabled := True;

 

End;

 

procedure TScreenInterfaceForm.IWTimer1Timer(Sender: TObject);

 

begin

 

   IWTimer1.Enabled := False;

 

   IWButton13.Caption := FormatDateTime('hh:nns', Now);

 

end;

 

The strange thing is that  "IWTimer1.Enabled := True;"  is executed, but the timer event never fires!?

 

Why? I'm so fustrated over IntraWeb.....

 

Best regards, Mikael