Search code examples
sapui5

How to indent the button?


I have following SAPUI5 app:

[Codepen](https://codepen.io/bifunctor/project/editor/XaOapY#)

I would like to indent the query button on the same like from input.

How to accomplish that?


Solution

  • This is kind of a hack. Just add an empty label association to the button.

    <Label text="Payers"></Label>
    <Input id="payerFrom" showSuggestion="true" placeholder="From"
       required="true">
    </Input>
    <Input id="payerTo" showSuggestion="true" placeholder="To"
       required="true">
    </Input>
    <Label text=""></Label>
    <Button text="Query" type="Emphasized" press="queryData">
       <layoutData>
          <layout:GridData span="XL6 L6 M6 S12"/>
       </layoutData>
    </Button>