Question about radio button events

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
frowdow
Posts: 3
Joined: Mon Nov 17, 2014 4:23 pm

Question about radio button events

Post by frowdow »

I have this dialog box with 2 radio/option buttons. I register a common listener for them. I use itemStateChanged to process the select event. But then i don't see a callback for the (automatically) deselected option button when its counterpart is selected. I would like a callback even for the deselected radio button. Is there a way to do this?
I also have some check boxes that i process within the dialog. So, alternatively, could I process all the dialog components when the OK button is clicked, by checking the return value of the execute() method? Is this possible? Any reason to pick one or the other?
OpenOffice 3.1 Windows 8.1
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Question about radio button events

Post by Villeroy »

You encounter limitiations of certain UNO objects? Try to make the most of it. There is no secret switch "behave normally".
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
JeJe
Volunteer
Posts: 2764
Joined: Wed Mar 09, 2016 2:40 pm

Re: Question about radio button events

Post by JeJe »

Bit offbeat suggestion but all a radio button is is a label with a ○ or ◉ character in front. A checkbox is a label with a ☐ or ☑ in front. So you could make your own radio buttons using labels and write your own code to set selection/deselection in response to mouseclicks on the label.
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
Post Reply