SAPUI5,如何:创建与 RadioButton 组内联的 Label/Text(按钮也是内联的)
SAPUI5, How to: Create a Label/Text that is inline with a RadioButton Group (the Buttons also inline)
我正在使用 SAPUI5,我只是想知道如何使 Text/Label 与 RadioButtonGroup 内联,
使用也内联的按钮。
总结:Text/Label 与按钮内联,也内联显示。
我尝试了什么:
<FlexBox alignItems="Start"
justifyContent="Center">
<Text text="An example of a group in warning state"/>
<RadioButtonGroup valueState="Warning">
<buttons>
<RadioButton id="RB4-1" text="Option 1"/>
<RadioButton id="RB4-2" text="Option 2"/>
</buttons>
</RadioButtonGroup>
</FlexBox>
它的作用:它使 Label/Text 与 RadioButtonGroup 内联,但是按钮显示为一个块。
如何实现我描述的格式?
This how it should look like
<FlexBox alignItems="Center"
justifyContent="Center">
<Text text="An example of a group in warning state" />
<RadioButtonGroup columns="4"
valueState="Warning">
<buttons>
<RadioButton id="RB4-1"
text="Option 1" />
<RadioButton id="RB4-2"
text="Option 2" />
<RadioButton id="RB4-3"
text="Option 3" />
<RadioButton id="RB4-4"
text="Option 4" />
</buttons>
</RadioButtonGroup>
</FlexBox>
RadioButtonGroup 有 属性columns
。多个列并排显示,而不是在下方显示。
如果将 alignItems
设置为 Center
,则标签和单选按钮文本(或多或少)垂直对齐。
我正在使用 SAPUI5,我只是想知道如何使 Text/Label 与 RadioButtonGroup 内联, 使用也内联的按钮。
总结:Text/Label 与按钮内联,也内联显示。
我尝试了什么:
<FlexBox alignItems="Start"
justifyContent="Center">
<Text text="An example of a group in warning state"/>
<RadioButtonGroup valueState="Warning">
<buttons>
<RadioButton id="RB4-1" text="Option 1"/>
<RadioButton id="RB4-2" text="Option 2"/>
</buttons>
</RadioButtonGroup>
</FlexBox>
它的作用:它使 Label/Text 与 RadioButtonGroup 内联,但是按钮显示为一个块。
如何实现我描述的格式?
This how it should look like
<FlexBox alignItems="Center"
justifyContent="Center">
<Text text="An example of a group in warning state" />
<RadioButtonGroup columns="4"
valueState="Warning">
<buttons>
<RadioButton id="RB4-1"
text="Option 1" />
<RadioButton id="RB4-2"
text="Option 2" />
<RadioButton id="RB4-3"
text="Option 3" />
<RadioButton id="RB4-4"
text="Option 4" />
</buttons>
</RadioButtonGroup>
</FlexBox>
RadioButtonGroup 有 属性columns
。多个列并排显示,而不是在下方显示。
如果将 alignItems
设置为 Center
,则标签和单选按钮文本(或多或少)垂直对齐。