I have a form that automatically resizes (height) based on the varying contents of a listbox. However, if the user manually sets the form height (by dragging with the mouse), then the program should respect that choice and stop the auto-sizing behavior.
I've set up a private boolean called ManualSized, set to False at default, and have a handler for the form's OnResize event to change ManualSized to True. The auto-resize code looks at the boolean, and skips resizing if it's True, but OnResize is called regardless of whether the resize is from User action, or from code, so once it "autoresizes", ManualSized is set to True, and no more auto-sizing happens.
Is there a way to distinguish between a coded form resize and a user-initiated resize?
Thanks,
bart
Lazarus 3.2 release version, FPC 3.2.2 Win64
Windows 10