B4J Question [ABMaterial] RadioButtonGroup question

Cableguy

Expert
Licensed User
Longtime User
Hi gurus

I am trying to place a group of two (2) radio buttons in a modal sheet, which is not the problem...
my question is, how can I, if at all, place the two side by side (horizontally aligned) instead of one on top of the other (vertically aligned)
 

alwaysbusy

Expert
Licensed User
Longtime User
I added a new method AddRadioButtonNoLineBreak() in v3.20, so you can regulate the line break yourself. It will show the NEXT radio button without a line break IF the available width makes it possible.

Usage example:
B4X:
Dim rbgroup As ABMRadioGroup
rbgroup.Initialize(page, "rbgroup", "radio")
rbgroup.AddRadioButtonNoLineBreak("Posibility 1", True)
rbgroup.AddRadioButton("Posibility 2", True)
rbgroup.AddRadioButtonNoLineBreak("Posibility 3", True)
rbgroup.AddRadioButton("Posibility 4", False)
   
rbgroup.SetActive(1) ' start from 0, so we select the second one!
Results in:

( ) Posibility 1 (X) Posibility 2
( ) Posibility 3 ( ) Posibility 4
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
Nice! That will save a lot of screen space, specially in modal sheets (that's where I was trying to use it)
 
Last edited:
Upvote 0
Top