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: users+help@global.libreoffice.org
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
Context
- [libreoffice-users] Going to an "OnExit' Routine On Dialog Button Event · Hal Vaughan
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.