Skip to Content
author's profile photo Former Member
Former Member

How can I make horizontal input box in XML.view??

This is my code

This output show us vertical input box

i want make IO input box and date Input box in one line

I want make this more looking good.

Please Help me

<core:View xmlns:core="sap.ui.core" xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m" xmlns:l = "sap.ui.layout"

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

controllerName="zhmmatest.CreatePR" xmlns:html="http://www.w3.org/1999/xhtml">

<Page title="Create PR">

<l:Grid defaultSpan="L3 M2 S4" class="sapUiSmallMarginTop">

<l:content>

<StandardListItem

title = "General Information" />

</l:content>

</l:Grid>

<form:SimpleForm width = "50%" editable="true">

<Label id = "iO" text= "IO" design = "Bold"/>

<Input type = "Text" width = "20%"/>

<Label text = "Date" design = "Bold"/>

<Input type = "Date" width = "35%" />

<Label text = "Purpose" design = "Bold"/>

<Input type = "Text"/>

<Label text = "Spec" design = "Bold"/>

<Input type = "Text" />

<Label text = "Ship to Loc" design = "Bold"/>

<Input type = "Text"/>

</form:SimpleForm>

</Page>

</core:View>

output.png (10.8 kB)
Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Jan 12, 2016 at 11:51 PM

    Hi,

    Embed your IO & Date field in a HorizontalLayout control -

    https://openui5.hana.ondemand.com/test-resources/sap/ui/layout/demokit/HorizontalLayout.html#__0

    Regards,

    Stephen

    Add a comment
    10|10000 characters needed characters exceeded

    • <mvc:View
        controllerName="sap.ui.layout.sample.HorizontalLayout.C"
        xmlns:l="sap.ui.layout"
        xmlns:mvc="sap.ui.core.mvc"
        xmlns="sap.m">
      
         <form:SimpleForm  width = "50%" editable="true">
          <l:HorizontalLayout class="sapUiSmallMargin" >
             <Label id = "iO" text= "IO" design = "Bold"/>
             <Input type = "Text" width = "20%"/>
             <Label text = "Date" design = "Bold"/>
             <Input type = "Date" width = "35%" />
        </l:HorizontalLayout>
        <Label text = "Purpose" design = "Bold"/>
        <Input type = "Text"/>
        <Label text = "Spec" design = "Bold"/>
        <Input type = "Text" />
        <Label text = "Ship to Loc" design = "Bold"/>
        <Input type = "Text"/>
        </form:SimpleForm>
      </mvc:View>
      
      

      Many examples including code can be found in the "Explored" section of the SAPUI5/OpenUI5 Developer Guide.

      OpenUI5 Explored

      Cheers,

      Stephen

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.