Am Dienstag, den 27.05.2008, 20:57 -0400 schrieb Andrew Douglas
Pitonyak:
> last I checked, this is what I found (in OOo version 1.3)
>
> Mathias Bauer, whom we all love, responded. You can not set the mouse
> pointer of a document window via UNO-API. VCL manages the mouse pointer
> based on the window, not the top window. Any VCL window can have its own
> mouse pointer set. If you want to change the mouse pointer of the
> document window, you must access its XWindowPeer (not the peer of the
> frame window), and this is not available in the API. Another problem
> might be that OOo changes the mouse pointer internally and overrides
> your setting.
>
> Berend Cornelius provided the final response. Your Sub works fine with
> any sub-window in your document. The following code refers to a control
> in a document:
>
> /*Listing 5.56: *Switch the mouse pointer for a control./
>
> Sub Main
>
> Dim oController
>
> Dim oControl
>
> Dim oDrawControl
>
> GlobalScope.BasicLibraries.LoadLibrary("Tools")
>
> oController = Thiscomponent.getCurrentController()
>
> oDrawControl = ThisComponent.Drawpage().getbyIndex(0).getControl()
>
> oControl = oController.getControl(oDrawControl)
>
> SwitchMousePointer(oControl.getPeer(), False)
>
> End Sub
>
> This routine changes the mouse pointer when it is over the control, but
> when the pointer is not over the control window it changes back. You
> want a "Wait" function that places the pointer in a wait state but this
> is currently not supported by the API.
>
> It is my opinion that you can change it but not for all things.
>
> oDoc.getCurrentController().getFrame().getContainerWindow().setPointer(...)
Another idea coming from OO.o 1.x:
Doesn't a simple
<mostly code>
on error goto unlock
ThisComponent.lockControllers()
... do sth.
ThisComponent.unlockControllers()
unlock:
ThisComponent.unlockControllers()
</mostly code>
set the wait cursor? I haven't used it since 1.1.3, but maybe ...
HTH,
Marc
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]