Results 1 to 4 of 4

Thread: Any layout that try to be 'responsive' like in 'responsive design'?

  1. #1
    Sencha Premium User SebTardif's Avatar
    Join Date
    Feb 2011
    Location
    Cambridge, MA
    Posts
    1,294
    Answers
    16

    Default Any layout that try to be 'responsive' like in 'responsive design'?

    I cannot believe 100% of the examples are not wrapping when I make the browser width smaller -> http://dev.sencha.com/ext/5.0.1/exam...nsink/#layouts

    All those layouts and nothing able to wrap.

    It seems because of Ext JS we are losing the wrapping provided by HTML.

    What people are using to have an adaptive UI for small resolution? A custom layout class from a third party?

  2. #2
    Sencha User joel.watson's Avatar
    Join Date
    Nov 2014
    Posts
    3,120
    Answers
    446

    Default

    Hi SebTardiff--

    Have you looked into the responsiveConfig that's new in Ext JS 5? It allows you to define how your application should respond to changes in screen size and orientation via either a plugin for components or a mixin for other classes.

    Here's an example: http://dev.sencha.com/ext/5.0.1/exam...app/index.html

    Also, some practial guidance and a deeper introduction are written up in a blog post from a few months ago: http://www.sencha.com/blog/designing...xt-js#comments

    Does that help?

    Thanks!

  3. #3
    Sencha Premium User SebTardif's Avatar
    Join Date
    Feb 2011
    Location
    Cambridge, MA
    Posts
    1,294
    Answers
    16

    Default

    I have read all the blogs and all the documentations more than one time.

    I realize that I can use the new hook to write any kind of code that end-up to do what I would like to see, but it's more code that I'm hoping. In most case, I need to remove all items, and put back with new layout, and structure.

    First, you cannot just switch of layout from hbox to vbox when the width is becoming smaller. There is no setLayout method.

    But, really, what I'm looking for is that when I have a row of fields that reach the maximum width, before the horizontal scroll bar shows up they instead start to wrap to the next line. So what people are used to have with pure HTML constructs.

    I'm somehow able to do some of this with Ext.layout.container.Column but it's not documented and probably not supported.

    Actually, if we was able to wrap fields inside a Ext.form.FieldSet I would consider this a significant progress, but I tried couple of things without any success.

  4. #4
    Ext JS Premium Member
    Join Date
    Oct 2009
    Posts
    95
    Answers
    8

    Default

    Rather than trying to make layouts that wrap next to each other, have you considered using a view? i.e. Ext.view.View

    Using a view with a tpl that creates a normal HTML table would allow its content to wrap when the containing layout was resized.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •