procedure TForm1.Button2Click(Sender: TObject);
var
Button: TButton;
Example : String;
begin
if {Example = ''} InputQuery('Put a question/request here', Example) then
Repeat
InputQuery('Put a question/request here', Example);
if InputQuery = False then
Abort
else
Until Example <> ''; //or InputBox.
Button := TButton.Create(self);
Button.Parent := self;
//Button properties go here
Button.Caption := (Example);
//Any procedures can go here
end;
This procedure continues after the repeat loop even if the user presses cancel. I've tried using the GoTo function using the CancelCreateButton
label if InputQuery = False
but I just get errors(so i removed some of the code).
How can i make it so that if the user clicks cancel on the inputquery it cancels the procedure and doesn't create a button?