Handle two radio buttons in a table layout - android-layout

In a table layout, there are two radio buttons in two rows. Is there any way to tie them as a group (as in radio group)? That means, user can check only one radio button at a time.
I tried to handle the logic at the event invocation using listener interfaces.
Any thoughts on a better way around?
Thanks in advance!

Implement setOnCheckedChangeListener(listener) on the radio buttons. When you get call in one radio button then uncheck other radio buttons.....

Related

How to add a radio button to an already existing Group Box in Excel

I am working on an Excel sheet that was made by someone else. There are some radio buttons in a group box linked to a macro. I have made the changes into the macro and want to add another radio button in the group box. How can I do that? When I add the new button, it is working separately from the other buttons in the group.
Thanks!
Since you do not answer the clarification questions, please proceed in the next way, according to the radio button type:
Form type radio buttons:
a. You firstly need to insert a Group Box (Developer Tab - Design Mode - Group Box
b. Drag the Form radio buttons on it.
All radio buttons placed on such a group box will act in the same group
ActiveX radio buttons:
a. You simply drag them on the sheet.
b. Press Properties from Developer tab Controls group and set the same group name (string) in GroupName property.
The radio buttons having the same GroupName will act as a group.
Since you do not say anything about the group boxes, most probably you are using ActiveX radio buttons. So, check the GroupName property of existing one in the group you need to add a new one and use the same.

Excel vba detect when any control form is clicked

I have a random number of radio buttons created dynamically according to table data. These buttons are all inside a Frame and each is individually named. What event controller or such do I use in order to detect which button has been clicked? I've put them all into the same 'GroupName'. I've tried groupname_click(), frame1_click(), mousedown_event detect. I'm not sure how to go about this.

Group radio buttons on Excel

I have two groups of radio buttons on the same Excel worksheet that I want them to work exclusively from each other.
I tried to search online for answers, and got to know there was GroupName Property which can be used to group the radio buttons, however, I haven't been able to locate this property.
Can anyone tell me how to find it?
There is only object positioning under the property tab of the format control window.
You need to add a group box control and then insert the radio buttons into that group box.
See here for more info: Add a group box or frame control to a worksheet
Use ActiveX controls
and in developer mode right click on RadioButton
and in properties box

XPages - Radio Button Group in a table

I would like to place the radio buttons from a radio button group in different cells within a table. Is this possible?
You can set the groupName attribute of the radio button (not radio button group) control to group multiple radio buttons under the same name. Something like this:
<xp:radio text="Label" id="radio1" groupName="MyRadioGroup"></xp:radio>
You can then place these radio buttons at there respective cells in table. On the downside you wont be able to compute the list of items as you can in radio button group.
Another option is you could write your own custom renderer, like in this answer, that would generate the table with radio buttons for you.
Yes, totally possible. As long as the HTML "name" attribute is the same then they will be treated as the same group. You can add this to your radio button in the All Properties under "attrs". Give it a name of "name" and a value of something common between radio buttons you want to group.
I am not even sure, that you need to use the Radio Button Group if you don't want.

Multiple groups of radio buttons on the same Excel worksheet using Aspose Cells

Is it possible to add more than one group of radio buttons to a single Excel worksheet using Aspose Cells for .NET?
I've tried doing this, but they they all seem to share the same group. Adding the radio buttons inside GroupBoxes doesn't seem to help. What am I doing wrong?
The sample code on Aspose's website only adds one set of radio buttons to each worksheet. Is it even possible to add multiple groups? (It works if you set it up manually in Excel.)
It took me a while to figure out what the problem was. The radio buttons in a group must be completely inside the group boxes (they can share a border with the box, but must not stray outside). Any radio buttons that are not completely bounded by a group box are assigned to the default group.
By default the radio buttons have no border or background, so it's not obvious just from looking at the generated Excel worksheet whether or not they are completely inside their grouping box. In my case, the radio buttons were overlapping the border of the grouping box.
Once I reduced the size of the radio buttons so they were contained completely inside the grouping box, it all worked as expected: two independent groups of radio buttons.

Resources