Doing a custom progress dialog in OpenOffice.org Basic
-
- Posts: 45
- Joined: Tue Dec 14, 2010 10:43 am
- Location: Morton, IL
Doing a custom progress dialog in OpenOffice.org Basic
Unfortunately, since com.sun.star.awt.XDialog doesn't return until the dialog is closed (which makes the dialog a modal dialog) the calling function can't execute code. I would use event handlers in the dialog, but there don't appear to be any timer related stuff in there. Any ideas?
Will Pittenger
I currently use OpenOffice 4.0 32-bit on Windows 7 64-bit (as of August 7th, 2013)
I currently use OpenOffice 4.0 32-bit on Windows 7 64-bit (as of August 7th, 2013)
- JohnSUN-Pensioner
- Volunteer
- Posts: 876
- Joined: Fri Jan 14, 2011 1:21 pm
- Location: Kyiv, Ukraine
Re: Doing a custom progress dialog in OpenOffice.org Basic
Please see the file from this message.
The last procedures in the module (with ProgBar in name) control the progress bar in dialog.
I hope this code will help you
The last procedures in the module (with ProgBar in name) control the progress bar in dialog.
I hope this code will help you
I may not have a lot to give but what I got I'll give to you...
Apache OpenOffice 4.1.5, LibreOffice 6.4.4.2 (x64) on Windows 7
If you think that I did not answer your question, make allowances for my imperfect English
Apache OpenOffice 4.1.5, LibreOffice 6.4.4.2 (x64) on Windows 7
If you think that I did not answer your question, make allowances for my imperfect English
-
- Posts: 45
- Joined: Tue Dec 14, 2010 10:43 am
- Location: Morton, IL
Re: Doing a custom progress dialog in OpenOffice.org Basic
Well, it might help, but do you have a simpler example? It will be a while before I find what I'm looking for in that.
Will Pittenger
I currently use OpenOffice 4.0 32-bit on Windows 7 64-bit (as of August 7th, 2013)
I currently use OpenOffice 4.0 32-bit on Windows 7 64-bit (as of August 7th, 2013)
Re: Doing a custom progress dialog in OpenOffice.org Basic
Try css.awt.AsyncCallback service.
Please, edit this thread's initial post and add "[Solved]" to the subject line if your problem has been solved.
Apache OpenOffice 4-dev on Xubuntu 14.04
Apache OpenOffice 4-dev on Xubuntu 14.04
- JohnSUN-Pensioner
- Volunteer
- Posts: 876
- Joined: Fri Jan 14, 2011 1:21 pm
- Location: Kyiv, Ukraine
Re: Doing a custom progress dialog in OpenOffice.org Basic
Sorry for the delay in response. Simple examples I have of course somewhere in the archives there, but I could not find them. Because I write a new example. (I hope you will excuse me for a small number comments in the code.)
The hardest thing was to come up with a slow process...
The hardest thing was to come up with a slow process...

- Attachments
-
- Sample of ProgressBars.ods
- (21.11 KiB) Downloaded 815 times
I may not have a lot to give but what I got I'll give to you...
Apache OpenOffice 4.1.5, LibreOffice 6.4.4.2 (x64) on Windows 7
If you think that I did not answer your question, make allowances for my imperfect English
Apache OpenOffice 4.1.5, LibreOffice 6.4.4.2 (x64) on Windows 7
If you think that I did not answer your question, make allowances for my imperfect English
- Charlie Young
- Volunteer
- Posts: 1559
- Joined: Fri May 14, 2010 1:07 am
Re: Doing a custom progress dialog in OpenOffice.org Basic
Nice example, but JohnSUN accidentally left the Forms Controls in Design Mode, so do View > Toolbars > Form Controls and toggle Design Mode off, or else the buttons will be selected instead of running the macros.JohnSUN-Pensioner wrote:Sorry for the delay in response. Simple examples I have of course somewhere in the archives there, but I could not find them. Because I write a new example. (I hope you will excuse me for a small number comments in the code.)
The hardest thing was to come up with a slow process...
Apache OpenOffice 4.1.1
Windows XP
Windows XP
-
- Posts: 45
- Joined: Tue Dec 14, 2010 10:43 am
- Location: Morton, IL
Re: Doing a custom progress dialog in OpenOffice.org Basic
I still can't find the relevant code.It doesn't help that the dialog is read-only. I can't access the properties. And I don't know what Charlie means by "Design Mode". Please note I'm working on a Writer document, not Calc.
Will Pittenger
I currently use OpenOffice 4.0 32-bit on Windows 7 64-bit (as of August 7th, 2013)
I currently use OpenOffice 4.0 32-bit on Windows 7 64-bit (as of August 7th, 2013)
- JohnSUN-Pensioner
- Volunteer
- Posts: 876
- Joined: Fri Jan 14, 2011 1:21 pm
- Location: Kyiv, Ukraine
Re: Doing a custom progress dialog in OpenOffice.org Basic
OK. From example code get line
It create progress bar in status bar.
Use metod .start() of this object to set text and max value of indicator.
Use metod .setValue() of this object to set new length of indicator.
Use metod .end() of this object to close indicator.
Code: Select all
oProgrBar = oDoc.getCurrentController().getFrame().createStatusIndicator()
Use metod .start() of this object to set text and max value of indicator.
Use metod .setValue() of this object to set new length of indicator.
Use metod .end() of this object to close indicator.
I may not have a lot to give but what I got I'll give to you...
Apache OpenOffice 4.1.5, LibreOffice 6.4.4.2 (x64) on Windows 7
If you think that I did not answer your question, make allowances for my imperfect English
Apache OpenOffice 4.1.5, LibreOffice 6.4.4.2 (x64) on Windows 7
If you think that I did not answer your question, make allowances for my imperfect English
-
- Posts: 45
- Joined: Tue Dec 14, 2010 10:43 am
- Location: Morton, IL
Re: Doing a custom progress dialog in OpenOffice.org Basic
Well, I think a dialog would be better for my needs. The dialog I have laid out shows overall progress, progress of the current step, number of terms found, number of use cases found, and more.JohnSUN-Pensioner wrote:OK. From example code get lineIt create progress bar in status bar.Code: Select all
oProgrBar = oDoc.getCurrentController().getFrame().createStatusIndicator()
Use metod .start() of this object to set text and max value of indicator.
Use metod .setValue() of this object to set new length of indicator.
Use metod .end() of this object to close indicator.
Will Pittenger
I currently use OpenOffice 4.0 32-bit on Windows 7 64-bit (as of August 7th, 2013)
I currently use OpenOffice 4.0 32-bit on Windows 7 64-bit (as of August 7th, 2013)