Radio Button Group options as HTML

Hi, I’m on the latest CUBA platform (7.2) and I have a dynamically created screen with various components. Amongst these components is a Radio Button Group. Now the captions for the options are quite complex and need to be easily readable, ideally spanning more than one line and different font sizes, bold text, etc. My thoughts were to create an HTML string for each option but this doesn’t seem to work. I notice that there is an HTML option for the main component caption and the description, but no obvious way to format each option as HTML.

Is there any trickery I can use to do this and at the same time ensure spacing is adhered to if an option spans several lines of HTML text?

Hi,

Unfortunately, RadioButtonGroup doesn’t support HTML for options as well as it can’t display multiline options.

Regards,
Gleb

Hi Gleb, thanks for the reply.

I solved it (kind of) using the following procedure:

  1. Create a 2 column grid with the number of rows corresponding to the number of options I want.
  2. In column 0 of each row create a Radio Button Group with a single option map and a blank caption.
  3. In column 1 of each row create an HTML enabled label.
  4. When a Radio Button Group is selected, some simple logic in the screen controller deselects all other groups (value = null).

The resulting effect is shown below.

4 Likes