[Solved] [python] Call function when double click Calc cell

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
strongleg
Posts: 10
Joined: Sat Oct 28, 2017 4:41 pm

[Solved] [python] Call function when double click Calc cell

Post by strongleg »

hi, i'm tring to write a python script to pop up a dialog while double click on a Calc cell.
but seems to hard to find guidelines. so any one can tell how to do this or where to find information?
thanks
Last edited by strongleg on Sun Oct 29, 2017 2:47 pm, edited 1 time in total.
OpenOffice 2.4 on Ubuntu 9.04
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: [python] To call a function when double click on a Calc

Post by Villeroy »

Install a recent version of either LIbreOffice or OpenOffice, right-click a sheet tab and assign a double-click mouse event.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
strongleg
Posts: 10
Joined: Sat Oct 28, 2017 4:41 pm

Re: [python] To call a function when double click on a Calc

Post by strongleg »

thanks, it works.

here is a further question: how to get col and row index of the clicked cell?
Villeroy wrote:Install a recent version of either LIbreOffice or OpenOffice, right-click a sheet tab and assign a double-click mouse event.
OpenOffice 2.4 on Ubuntu 9.04
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: [python] To call a function when double click on a Calc

Post by Villeroy »

As a Python programmer you should be able to analyse any passed arguments.

The MRI extension is also necessary to do anything useful with this API.
Install it and point your sheet event to the Basic macro MyMacros.Mri.Module1.mri which calls MRI with the passed argument.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Post Reply