Skip to Content
avatar image
Former Member

Space controls in UI5

Hi ,

Are there any controls in general for spaces or invisible UI elements to insert gaps between controls or spaces in layout. I saw similar space control like toolbarspacer but is there any spacer to use in general.

Regards,

Koti Reddy

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Jan 09, 2015 at 01:51 AM

    I would go with what Kai has suggested. Can you give us some examples on what you are trying to do?

    thanks

    -D

    Add comment
    10|10000 characters needed characters exceeded

    • Oh boy, please no! I was just sooooo happy SAP got rid of those terrible spacer and/or invisible elements in UI5, which they forced us to use in Web Dynpro... 😉

      IMHO, it's already a bad decision they still have the MatrixLayout et al in SAPUI5, but my guess is they have included it to make long-time Web Dynpro developers happy. But the MatrixLayout is just like the HTML table: it should only be used for tabular data, and not for laying out your controls. There are better elements to do that (FlexBox)

      It may take some effort, but CSS is always the best solution to for spacing, aligning, scaling or whatever layout-based change you need to make. With simple screens you may get away with it, but especially with complex XML views, I would reject any code that contains styling and extra elements in the hierarchy, just to cater aligning or spacing stuff.

      Remember, you should always separate presentation and content, and building visual styling into your views is a bad, bad idea.

  • Jan 08, 2015 at 10:46 AM

    why not use css for that?

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 08, 2015 at 10:55 AM

    You can check answer from Robin van het Hof in the thread html - Space between controls in SAPUI5 - Stack Overflow

    Regards,

    Chandra

    Add comment
    10|10000 characters needed characters exceeded