On Fri, 2005-02-11 at 00:16, Carsten Driesner wrote:
> Ian Laurenson wrote:
> > I would like to be able to show the current view cursor position in the
> > status bar.
> > Instead of the Point struct which returns the cursors position relative
> > to the top left of the first page, I would like to return how many
> > characters from the left edge and how many lines down the page.
> > 
> > If anyone has suggestions on how I can solve this problem I would be
> > very grateful.
> > 
> > Questions that might help me to solve this problem:
> > 
> > In 1.9.74 I can't change the statusIndicator with the following code,
> > which works 1.1.4. Is this a bug or policy change?
> > 
> > oStatus = ThisComponent.CurrentController.Frame.createStatusIndicator
> > oStatus.setText("Hello World")
> > 
> 
> Hi Ian,
> 
> Please use the following code snippet for OOo 2.0 (1.9.x) to set a text 
> in a progress bar. The old way which works in 1.1.4 is using a not 
> supported way to set text in a progress.
> You have to start the progress before you can set text or you can also 
> use start( Text, Range ).
> 
> REM *** Retrieve the desktop service
> oDesktop = createUnoService("com.sun.star.frame.Desktop")
> 
> REM *** Retrieve the current frame and layout manager
> oCurrFrame = oDesktop.getCurrentFrame()
> 
> oStatus = oCurrFrame.createStatusIndicator()
> oStatus.start( "Hello World!", 100 )

Thanks Carsten.

Are the changes to the API for 1.9.x documented anywhere?

I can repeatedly update the status bar (I note that you call it a
progress bar - is their a difference?) by doing a oStatus.end before
oStatus.start. But this causes the status bar to flicker back to normal.
I am updating the status bar at each key press, so I want it to run fast
and preferably flicker free.

Thanks, Ian


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to