OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

How to reset the status bar

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
Kiloran
General User
General User


Joined: 20 Jun 2010
Posts: 8

PostPosted: Wed Jun 22, 2011 4:15 am    Post subject: How to reset the status bar Reply with quote

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
View user's profile Send private message
probe1
Moderator
Moderator


Joined: 18 Aug 2004
Posts: 2560
Location: Chonburi Thailand Asia

PostPosted: Wed Jun 22, 2011 6:16 am    Post subject: Re: How to reset the status bar Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
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