Hi
using lockControllers, screen is not refreshed but what the user types
on the keyboard is displayed once unlockControllers called
I used a KeyHandler to solve this problem, not forwarding any keystroke
is there a cleanest way to totally lock (screen & inputs) a document
Thanks in advance
Laurent
'--------
Sub Main
on error goto cleanExit
RegisterKeyHandler
thisComponent.lockControllers
wait(5000)
cleanExit:
thisComponent.unlockControllers
unRegisterKeyHandler
print "exit"
End Sub
Sub RegisterKeyHandler
oDocView = ThisComponent.getCurrentController
oKeyHandler = createUnoListener("keyHandler_",
"com.sun.star.awt.XKeyHandler")
oDocView.addKeyHandler(oKeyHandler)
End Sub
'----------------------------------------
Sub UnregisterKeyHandler
on error resume next
oDocView.removeKeyHandler(oKeyHandler)
End Sub
'----------------------------------------
Function keyHandler_KeyPressed(oEvt)
keyHandler_KeyPressed=True
End Function
'----------------------------------------
Function keyHandler_KeyReleased(oEvt)
keyHandler_KeyReleased = False
End Function
'----------------------------------------
Function keyHandler_disposing()
end function
--
Laurent Godard <[EMAIL PROTECTED]> - Ingénierie OpenOffice.org
Indesko >> http://www.indesko.com
Nuxeo CPS >> http://www.nuxeo.com - http://www.cps-project.org
Livre "Programmation OpenOffice.org", Eyrolles 2004
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]