| View previous topic :: View next topic |
| Author |
Message |
Kiloran General User

Joined: 20 Jun 2010 Posts: 6
|
Posted: Wed Jun 22, 2011 4:15 am Post subject: How to reset the status bar |
|
|
I'm using the following code to set the status bar in a Calc macro:
| Code: | sub set_status (main_book, mytext, level)
oDocCtrl = main_book.getCurrentController()
oDocFrame = oDocCtrl.getFrame()
oStatusIndicator = oDocFrame.createStatusIndicator()
oStatusIndicator.start( "", 7 ) ' seven values, zero thru six
oStatusIndicator.setValue( level )
oStatusIndicator.setText( mytext )
end sub |
This works fine, but I'm having problems setting the status bar back to its normal state (with the sheet number on the left side and the sheet zoom control on the right side).
I thought this would work:
oStatusIndicator.end()
but it has no effect.
I also tried:
ThisComponent.CurrentController.StatusIndicator.reset
This removes the text in the status bar but I still cannot see the original content of the status bar, such as the zoom control.
Any ideas? _________________ --Kiloran
OpenOffice 3.4.1 using Vista |
|
| Back to top |
|
 |
probe1 Moderator


Joined: 18 Aug 2004 Posts: 2465 Location: Chonburi Thailand Asia
|
Posted: Wed Jun 22, 2011 6:16 am Post subject: Re: How to reset the status bar |
|
|
| Kiloran wrote: | oStatusIndicator.end()
but it has no effect. |
You've declared the variable?
The instruction itself WFM if called in an on-going macro. If call the SUB posted, then do something other, then want to end the StatusIndicator... the variable used have to be set to the object first.
HTH _________________ Cheers
Winfried
My Macros
DateTime2 extension: insert date, time or timestamp, formatted to your needs |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|