vbox-form.html 1.6 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
  2. <html>
  3. <head>
  4. <title>Form With VBox Layout</title>
  5. <!-- ExtJS -->
  6. <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
  7. <script type="text/javascript" src="../../ext-all.js"></script>
  8. <!-- Shared -->
  9. <link rel="stylesheet" type="text/css" href="../shared/example.css" />
  10. <!-- GC -->
  11. <script type="text/javascript" src="../shared/states.js"></script>
  12. <!-- Example -->
  13. <script type="text/javascript" src="vbox-form.js"></script>
  14. </head>
  15. <body>
  16. <h1>VBox Layout with Forms</h1>
  17. <p>The <code><b>align:'stretch'</b></code> config of the vbox layout manager ensures
  18. all child items are 100% of the container width.</p>
  19. <p>The <code><b>flex</b></code> config of child items of a vbox layout specifies what share of the vertical
  20. space left when unflexed items are accounted for to allocate for that child item.</p>
  21. <p>Compare this to <a href="anchoring.html">The anchoring example</a>. That anchors the fields
  22. to a hardcoded offset from the edge of the Container. The box layout managers allow much more
  23. flexibility in use of available space.</p>
  24. <p>The js is not minified so it is readable. See <a href="vbox-form.js">vbox-form.js</a>.</p>
  25. <p>This also illustrates the use of plugins to alter the default behaviour of Components. The <b>Send To</b>
  26. field clones itself until the final one is left blank to allow multiple mail recipients. The layout
  27. manager keeps the vertical space allocated correctly.</p>
  28. </body>
  29. </html>