cancel
Showing results for 
Search instead for 
Did you mean: 

Align radiobuttons with large texts and wrap

Former Member
0 Kudos

Hello everyone,

I have a radiobutton group with 5 options, each one mapped to an enumeration type. The elements in the enumeration type have large texts to describe each one of them. I allready tried to put them in TextViews to the right of the radiobutton group, but i can´t manage to align the texts with the buttons. So, i tried putting those descriptions in the description values of the enumeration. This works fine for aligning the text, but makes the text not possible to wrap, ie, if you close to 50% the width of the explorer window, the text doesn't break in new lines, instead it stays in one rigid line that doesn't appear completely on screen.

Is there other ways, or is this a limitation ?

Thank you everyone.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Radiobuttons with such long descriptions seem strange. Why not simply use a table with single selection instead.

Armin

Answers (2)

Answers (2)

Former Member
0 Kudos

Nuno,

First of all:

<i>Is there other ways, or is this a limitation ?</i>

The better term is "UI consistency enforcement" rather then "limitation". And this is hardly a joke.

Anyway, you can create what you want:

1. Dynamic UI programming necessary, otherwise you have to support both enumeration type and view layout (changing set of valid values in enumeration type assumes adjusting view layout)

2. Create TransparentContainer and apply Matrix layout to it. Optionally you may set explicit width of container. The rest of controls are placed in this container.

3. First cell is RadioButton with MatrixHeadData layout data, vertical align is either "top" or "middle"

4. Second cell is TextView with wrapping set to true, layout data = MatrixData, vertical align either "top" or "middle" in concordance with [3]. Set wrapping property to true for TextView. Preferable, set width of ayout data to 100%.

5. Repeat [3]-[4] for every possible value of enumeration type.

Valery Silaev

SaM Solutions

http://www.sam-solutions.net

former_member182294
Active Contributor
0 Kudos

Hi Nuno,

We had a similar problem, we implemented in this way..

-> create a table with two columns

- First column with radio buttin

- Second column with Text, with wrapping propery to true.

If you dont wan't the Table look, work with table properties (design=trasparent) to have a plain look.

Regards

Abhilash