Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2017-11

[PATCH][LCL] Fix BitBtn Kind property with ShowModal

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Tarnyko

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

[1] : http://www.tarnyko.net/repo/BitBtnKind_bug.zip

Reply by email