Skip to Content
0
Former Member
Aug 19, 2015 at 01:38 PM

How to make a label and a text in the same line in Simple Form?

4521 Views

Hi experts,

How to make a label and a text in the same line in Simple Form?

My Code:

<core:FragmentDefinition

xmlns="sap.m"

xmlns:l="sap.ui.layout"

xmlns:f="sap.ui.layout.form"

xmlns:core="sap.ui.core">

<Dialog id="DisplayAccountDialog" title="{i18n>DisplayAccountTitle}" modal="true"

icon="sap-icon://activity-individual" stretchOnPhone="false"

showCloseButton="ture">

<content>

<l:Grid defaultSpan="L12 M12 S12" width="auto">

<l:content>

<f:SimpleForm id=""

minWidth="200em"

maxContainerCols="2"

editable="false"

layout="ResponsiveGridLayout"

title=""

labelSpanL="4"

labelSpanM="4"

emptySpanL="0"

emptySpanM="0"

columnsL="2"

columnsM="2">

<f:content>

<Label text="{i18n>SerialNo}" />

<Text text="{SerialNo}" />

<Label text="{i18n>PreqQty}" />

<Text text="{PreqQty}" />

<Label text="{i18n>GLAcct}" />

<Text text="{GLAcct}" />

<Label text="{i18n>CostCtr}" />

<Text text="{CostCtr}" />

</f:content>

</f:SimpleForm>

</l:content>

</l:Grid>

</content>

<beginButton>

<Button text="{i18n>Confirm}" press="confirm" />

</beginButton>

</Dialog>

</core:FragmentDefinition>

and how to make the marginTop and marginBottom smaller?

<Table id="Items" headerText="" items="{Items}" >

<columns>

<Column hAlign="Center">

<header>

<Label text="{i18n>PreqItem}" />

</header>

</Column>

<Column hAlign="Center" visible="{device>/isNoPhone}">

<header>

<Label text="{i18n>Quantity}"/>

</header>

</Column>

<Column hAlign="Center" visible="{device>/isNoPhone}">

<header>

<Label text="{i18n>DelivDate}"/>

</header>

</Column>

<Column hAlign="Center">

<header>

<Label text="{i18n>ShortText}" />

</header>

</Column>

<Column hAlign="Right" width="3em">

<header>

<Button icon="sap-icon://add" press="handleAddItem" />

</header>

</Column>

</columns>

<ColumnListItem type="Navigation" press="handleLineItemPress" >

<cells>

<ObjectIdentifier title="{PreqItem}" />

<ObjectNumber number="{Quantity}" numberUnit="{Unit}" visible="{device>/isNoPhone}"/>

<Text text="{DelivDate}" visible="{device>/isNoPhone}"/>

<Text text="{ShortText}"/>

<Button icon="sap-icon://delete" press="handleDeleteItem" />

</cells>

</ColumnListItem>

</Table>

thank you.

best regards,

felix.