• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

[HELPED] Understanding Layouts...?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [HELPED] Understanding Layouts...?

    Some things don't always add up and I'm sure there's a logical reason. I just haven't figured it out.

    I have a border layout with a west and center region. Based on the API docs border layout example, it appears that you don't have to set a width on the center region if you have set it on the others; Ext will figure it out. I set my width on the west region to width: '50%'.

    One would think that when the viewport is displayed, you would see basically a split screen 50% west, 50% center; but, nay nay... It's more like 30% west & 70% center. I'm perplexed... Seems like such a simple thing. So there obviously must be more to the story than I understand about layouts. Any hints or thoughts as to why it would be so off?

    Part II of the story: Inside my center region I have a hbox layout, align stretch, with a data view. The data view contains thumbnail images. Looks nice. Works good. I wanted to add a nice feature so that when the west region collapsed the center region would re-do it's layout and reorganize the thumbnails to fit more columns across.

    I was able to trap the collapse event but no matter what method I've tried on the data view to re-do the thumbnails, nothing has had any effect. You would think align stretch would work it's magic once the method is applied (if there is one). I've tried
    doAutoRender, doComponentLayout, forceComponentLayout, refresh... nada. update looks like it has potential since I used a tpl but I'm not sure what the parm I would pass would be.

    To date I've not seen anything that can't be accomplished with Valence & Ext.. I would think this could be done.

    Anyone? Anyone? Bueller? Bueller?

  • #2
    I tried the 50% example in the border layout and it was working properly. What version of Ext are you using?

    As far as part II, are there any other components in the center region beside the dataview? If not, then I would use a fit layout. If you continue to use the hbox layout though, ensure that your dataview has a flex property attached to it.

    Comment


    • #3
      I'm using 4.0.7. The fit did the trick for the thumbnails data view! But yes, I do have another item in the center region. It's a panel that I embed a pdf document in. I hide one or the other based on a toggle button. When I changed the center to fit, I lost my tbar in the panel, trying to figure that out now.

      Comment

      Working...
      X