[Lazarus] Exception in OnResize event handler

Mattias Gaertner nc-gaertnma at netcologne.de
Sun Nov 6 12:45:34 CET 2016


> Jürgen Hestermann via Lazarus <lazarus at lists.lazarus-ide.org> hat am 6. November 2016 um 12:27 geschrieben:
>[...]
> "Especially it is not sufficient to write only a TForm.OnResize handler
> to resize all controls on the form. This is a common bug in Delphi applications."
> 
> What does the last sentence mean?

For example a TButton in a TGroupBox in a TForm. When the theme changes, the GroupBox client area may change, and the form's client area not. Then form's OnResize is not triggered. You need to set the GroupBox.OnResize event.


> What else is needed to resize all controls on the form?

Depending on your layout you may need to set more Control OnResize events.

Mattias


More information about the Lazarus mailing list