I have some code that allows users to pick several options. If they press OK then the code runs as expected but I can't get the cancel button to cancel the code. Exiting the window also results in the code being run. I would like the user to be able to cancel or exit the window and have that stop the code.
win = New Window( "Customise Analysis",
<<Modal,
<<Return Result,
<<On Validate(x = cb<<Get();
If( ...
);
),
Text Box("Choose the product"),
cb = Combo Box(
{"..."},
),
Text Box( "..." ),
fail_out = Number Edit Box( 100 ),
Text Box("..."),
Text Box("..."),
point_lim = Number Edit Box(2),
Button Box("OK"),
Button Box("Cancel"),
);