Hi Laurent,
i try to react to clicks on some cells
Using the com.sun.star.awt.XMouseClickHandler, i only retreive the
coordinates of the pointer. Is there a way to know which cell has been
clicked ?
I'm actually using the com.sun.star.view.XSelectionChangeListener
It globally works but i encounter 3 problems
- some double calls
- if the user moves the mouse during the callback function
_selectionChanged, i end with a state "during selection", i mean, as if
i was curren,tly selecting a range (moving the mouse hanges the selection)
- using print preview shutdown the listener
Are this known issues ? Any workaround ?
at least with OOo2 something like the following should work
Sub Main
view = ThisComponent.currentController
xEMCH =
createUnoListener("CB_","com.sun.star.awt.XEnhancedMouseClickHandler")
view.addEnhancedMouseClickHandler(xEMCH)
End Sub
function CB_mousePressed(event)
addr = event.target.CellAddress
msgbox "pressed ...
sheet:"+addr.Sheet+",Column:"+addr.Column+",Row:"+addr.Row
CB_mousePressed = true
end function
function CB_mouseReleased(event)
CB_mouseReleased = true
end function
Hope that helps
Regards
Stephan
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]