I have a macro in LO BASIC that sets up a dialog, then, instead of executing it, I do:
oDialog.setVisible(TRUE) This dialog box contains a progress bar and, while testing it, I realized it's frustrating for longer documents to have a progress bar and force me to sit and wait without a way to cancel it. So I added a Cancel button. This dialog is in my library and I'd like to find a way to set up the "Cancel" button so it can either stop the script or possibly even call a clean up routine when it's been pressed - or have it change the state of a global variable so a routine could see if it's been pressed. I know there are event handlers so I can do something on events like MouseOver and so on. And if I were not putting this in a library, I could easily specify, in the Dialog Settings, which routine to call on Cancel. But if I want the dialog in a library, is there a way, when calling the function that sets it up, to specify a routine to call when the Cancel button is pressed? Or is there some way to create a global variable or any kind of flag that I could have changed when the button is pressed? In other words, other than putting in a "Stop" command, or specifying one routine name to call when an event triggers it, can I pass on the name or pointer to a routine that would be called when the button is pressed? Hal -- For unsubscribe instructions e-mail to: [email protected] Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
