On Sat, 11 Feb 2023 21:15:25 +0100, Bo Berglund via lazarus <lazarus@lists.lazarus-ide.org> wrote:
>So in order to fix this on the first form I have had to implement the OnClick >event and code the following into them: > >ModalResult := mrOk >(or mrCancel) as needed. > >This causes the wanted behaviour. > >But this was not how the Delphi TBitButton operated, why has it changed? >And is there some way I can restore this functionality without having to add >OnClick event handlers to all of these buttons? >Some special $MODE setting perhaps? > >The Delphi converter I used in Lazarus to port the application put >{$MODE Delphi} >into most units.. It might be the converter that does this... It made a new lfm file from the dfm that Delphi had made and maybe it did not transfer the button kind properly so that the modalresult was not set as it would be when the kind was selected... Anyway by going over the forms and changing ModalResult to the proper value depending on the Kind property value made it work as expected. No OnClick event handler needed. Now working properly. -- Bo Berglund Developer in Sweden -- _______________________________________________ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus