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

Keyboard macros or custom scripts

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

Postby strongleg » Sat Oct 28, 2017 4:47 pm

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
strongleg
 
Posts: 9
Joined: Sat Oct 28, 2017 4:41 pm

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

Postby Villeroy » Sat Oct 28, 2017 4:56 pm

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 16.04, OpenOffice 4.x & LibreOffice 5.x
User avatar
Villeroy
Volunteer
 
Posts: 24784
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

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

Postby strongleg » Sun Oct 29, 2017 3:36 am

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
strongleg
 
Posts: 9
Joined: Sat Oct 28, 2017 4:41 pm

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

Postby Villeroy » Sun Oct 29, 2017 12:57 pm

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 16.04, OpenOffice 4.x & LibreOffice 5.x
User avatar
Villeroy
Volunteer
 
Posts: 24784
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany


Return to OpenOffice Basic, Python, BeanShell, JavaScript

Who is online

Users browsing this forum: No registered users and 1 guest