flexdev Posted May 10, 2019 Share Posted May 10, 2019 Hi, I encountered difficulties in using messagedlg, on some occasions it seems to not work, in particular the message is show but the callback procedure is not execute. Example: procedure TgenericformGrid.UniFormClose(Sender: TObject; var Action: TCloseAction); begin inherited; if DSGrid.State in [dsEdit, dsInsert] then begin MessageDlg('Dati non salvati , salvo prima di uscire? ' , mtWarning, [mbOK,mbCancel], procedure (Sender: TComponent; Res: Integer) begin if res = mrOk then DSGrid.DataSet.Post; end ) end; end; Best Regards. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.