Ticket #1578 (new enhancement)
[patch][cla] StretchPane (formerly called ElasticPane), now working in moz/ff and ie
| Reported by: | aum | Owned by: | tk |
|---|---|---|---|
| Priority: | normal | Milestone: | future |
| Component: | Dojox | Version: | 0.3 |
| Severity: | normal | Keywords: | |
| Cc: | tk |
Description (last modified by bill) (diff)
(This announcement supersedes and obsoletes a prior submission for 'ElasticPane?'. I have renamed ElasticPane? to StretchPane?, because it's two syllables shorter!)
The attached patch adds to Dojo a new widget called StretchPane? which (in contrast to the prior ElasticPane? implementation) is now tested and working in both moz/ff and msie.
StretchPane? is a widget, subclassed from ContentPane?, which sets its own position and size according to the size of its parent widget, via html attributes. It is suited for layouts where you want control over how widgets expand and contract as the window is resized. For instance, you might have a thin left pane with links, and a large right pane for content. You can implement these panes as StretchPane?, so that the left pane has a minimum width and doesn't stretch fast, while the right pane takes up all remaining space. I wrote this to overcome a painful limitation in CSS - the inability to base position/size on formulas, rather than percentage OR pixels.
The patch places the implementation in src/widget/StretchPane.js and a simple clear example in tests/widget/test_StretchPane.html