Atozed Forums
IWAppFormResize not updating properties - Printable Version

+- Atozed Forums (https://www.atozed.com/forums)
+-- Forum: Atozed Software Products (https://www.atozed.com/forums/forum-1.html)
+--- Forum: IntraWeb (https://www.atozed.com/forums/forum-3.html)
+---- Forum: English (https://www.atozed.com/forums/forum-16.html)
+----- Forum: IntraWeb General Discussion (https://www.atozed.com/forums/forum-4.html)
+----- Thread: IWAppFormResize not updating properties (/thread-2941.html)



IWAppFormResize not updating properties - Lenfors - 11-29-2022

Hello!

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

Procedure TScreenInterfaceForm.IWAppFormResize(Sender: TObject);
Begin
   IWButton13.Caption := FormatDateTime('hh:nnConfuseds', 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:nnConfuseds', 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:nnConfuseds', 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