2017-07-15 39 views
1

我想在SAPUI5中使用塊佈局來創建表單,但我有一個問題,我想在上面的組合框中顯示標籤文本和帶有標籤的組合框,但是我不能。我想定位組合框和標籤,就像標籤和輸入字段(標籤下面的輸入)一樣。但是組合框放在標籤旁邊。我該如何解決這個問題?SAPUI5 blocklayout形式

代碼:

 <Panel> 
      <content> 
       <l:VerticalLayout id="containerLayout" width="100%"> 
        <l:BlockLayout id="BlockLayout" background="{/selectedBackground}"> 
         <l:BlockLayoutRow accentCells="Accent0"> 
          <l:BlockLayoutCell width="3"> 
           <Text text="Alamat" /> 
           <ComboBox /> 
          </l:BlockLayoutCell> 
         </l:BlockLayoutRow> 

         <l:BlockLayoutRow accentCells="Accent1"> 
          <l:BlockLayoutCell id="Accent1" width="2"> 
           <Text text="Name" /> 
           <Input /> 
          </l:BlockLayoutCell> 
          <l:BlockLayoutCell> 
           <Text text="Alamat" /> 
           <Input showValueHelp="true"/> 
          </l:BlockLayoutCell> 
          <l:BlockLayoutCell titleAlignment="End"> 
           <Text text="HP" /> 
           <Input /> 
          </l:BlockLayoutCell> 
         </l:BlockLayoutRow> 

         <l:BlockLayoutRow> 
          <l:BlockLayoutCell id="Accent2" width="2"> 
           <Text text="Name" /> 
           <Input /> 
          </l:BlockLayoutCell> 
          <l:BlockLayoutCell> 
           <Text text="Alamat" /> 
           <Input /> 
          </l:BlockLayoutCell> 
          <l:BlockLayoutCell titleAlignment="End"> 
           <Text text="HP" /> 
           <Input /> 
          </l:BlockLayoutCell>          
         </l:BlockLayoutRow> 
        </l:BlockLayout> 
       </l:VerticalLayout> 
      </content> 
     </Panel> 

Block Layout

回答

0

,你可以簡單的地方都在標籤和垂直佈局中的組合框。這會將Combobox放置在標籤下方。

<Panel> 
     <content> 
      <l:VerticalLayout id="containerLayout" width="100%"> 
       <l:BlockLayout id="BlockLayout" background="{/selectedBackground}"> 
        <l:BlockLayoutRow accentCells="Accent0"> 
         <l:BlockLayoutCell width="3"> 
          <l:VerticalLayout> 
           <Text text="Alamat" /> 
           <ComboBox /> 
          </l:VerticalLayout> 
         </l:BlockLayoutCell> 
        </l:BlockLayoutRow> 
... 
... 
</Panel>