03-11-2021, 12:04 PM
(03-11-2021, 10:52 AM)Jose Nilton Pace Wrote: Hi, see this demo.
Code:with IWModalWindow1 do begin
Reset;
Buttons.CommaText := '&Yes,&No,&Cancel,"I give &up|NoClose"';
...
Show;
end;Code:procedure TIWForm60.WindowDoOnAsyncClick(Sender: TObject; EventParams: TStringList);
var
BtnCaption: string;
begin
if IWModalWindow1.ButtonIndex >= 0 then begin
BtnCaption := IWModalWindow1.ButtonCaption[IWModalWindow1.ButtonIndex]; // First ButtonIndex is 1, not 0
WebApplication.ShowMessage('You clicked on button: ' + BtnCaption);
end;
end;
Thank you Jose,
I've seen this example earlier.
This example does not answer my question.
Using the NoClose parameter, you can set the button behavior before the modal window appears.
I want to control the behavior of the button while the modal is already open.

