Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Buttons of ModalWindow - enabled:= true / false
#2
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;
Reply


Messages In This Thread
RE: Buttons of ModalWindow - enabled:= true / false - by Jose Nilton Pace - 03-11-2021, 10:52 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)