Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

How to center RadioButton and caption

tobiasm11312922
Level 1
Level 1

Hello,

how can I center the caption below the Radio button (see Image), is this possible.

2015-06-18_131411.jpg

1 Accepted Solution
radzmar
Correct answer by
Level 10
Level 10

You can center the button and the caption when you add additional <para> elements to the XML source.

This is source code for such radio button.


<field y="0mm" x="0mm" w="22mm" h="12mm" name="RadioButton">


              <ui>


                  <checkButton shape="round">


                    <border>


                        <edge stroke="lowered"/>


                        <fill/>


                    </border>


                  </checkButton>


              </ui>


              <para vAlign="middle" hAlign="center"/>


              <font typeface="Arial"/>


              <margin leftInset="0mm" rightInset="0mm"/>


              <caption placement="bottom" reserve="0.236222in">


                  <para vAlign="middle" hAlign="center"/>


                  <value>


                    <text>Option XY</text>


                  </value>


              </caption>


              <items>


                  <integer>1</integer>


              </items>


            </field>


View solution in original post

4 Replies
Anonymous
Not applicable

What do u mean by centered here? The caption below the radio button is already centered.

tobiasm11312922
Level 1
Level 1

Then vice versa center the button above the caption 🙂

lateniteNC
Level 4
Level 4

You could try adding a radio button to your form, then from the Layout palette, set the caption to none. Add a text object below your radio button and position manually to achieve the desired spacing you seek.

radzmar
Correct answer by
Level 10
Level 10

You can center the button and the caption when you add additional <para> elements to the XML source.

This is source code for such radio button.


<field y="0mm" x="0mm" w="22mm" h="12mm" name="RadioButton">


              <ui>


                  <checkButton shape="round">


                    <border>


                        <edge stroke="lowered"/>


                        <fill/>


                    </border>


                  </checkButton>


              </ui>


              <para vAlign="middle" hAlign="center"/>


              <font typeface="Arial"/>


              <margin leftInset="0mm" rightInset="0mm"/>


              <caption placement="bottom" reserve="0.236222in">


                  <para vAlign="middle" hAlign="center"/>


                  <value>


                    <text>Option XY</text>


                  </value>


              </caption>


              <items>


                  <integer>1</integer>


              </items>


            </field>


View solution in original post