Hi folks,
Please find attached a patch which fixes the following issue :
When we position the Kind property of a BitBtn, to "bkYes" e.g., and its parent Form is in a modal state ; clicking the button is normally supposed to close the Form and return the modal result value ("mrYes" e.g.).
Here, it does not work because the ModalResult property is never positioned at design time by the SetKind() function. This patch fixes this by reorganizing function calls.
To reproduce the issue, you can download the following test case [1].
Just extract it and compile it ; if you are on Windows, you can directly run "compile-delphi.bat" or "compile-lazarus.bat" (you may want edit this last script to change the %LAZPATH% variable).
Notice that with Delphi, clicking on buttons gives feedback, whereas it does not with Lazarus until you apply the patch.
Regards,
Tarnyko
