How do I detect when a viewer shown with showdialog() is closed with the Close or Exit button. I tried adding things like this
report.addEventListener(Event.CLOSE, onComplete);
report.addEventListener(Event.CANCEL, onCancel);
but I'm not getting anywhere.
Thanks!
How to tell when showdialog() is closed/exited?
Re: How to tell when showdialog() is closed/exited?
Hello,
You can use this code:
Thank you.
You can use this code:
Code: Select all
var viewer: StiViewerFx = report.showDialog();
// The dialog is closed (Close and Exit buttons)
viewer.parent.addEventListener(StiWindowFormEvent.FORM_CLOSE, onViewerDialogClose);
// The viewer is closed (only Exit button)
viewer.addEventListener(StiViewerEvent.EXIT, onViewerExit);
private function onViewerDialogClose(event: StiWindowFormEvent): void
{
StiMessageBox.showMessage("Viewer", "Form Close OK!");
}
private function onViewerExit(event: StiViewerEvent): void
{
StiMessageBox.showMessage("Viewer", "Exit OK!");
}
Re: How to tell when showdialog() is closed/exited?
D'oh. I completely missed the EXIT event.
Thanks for your help.
-pc
Thanks for your help.
-pc
Re: How to tell when showdialog() is closed/exited?
Hello.
We are always glad to help you.
Let us know if you need any additional help.
Thank you.
We are always glad to help you.
Let us know if you need any additional help.
Thank you.