window.html 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
  2. <html>
  3. <head>
  4. <title>Windows</title>
  5. <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css"/>
  6. <!-- GC -->
  7. <script type="text/javascript" src="../../ext-all.js"></script>
  8. </head>
  9. <body>
  10. <script type="text/javascript" charset="utf-8">
  11. Ext.require([
  12. 'Ext.button.Button',
  13. 'Ext.layout.container.Border',
  14. 'Ext.window.MessageBox'
  15. ]);
  16. Ext.onReady(function() {
  17. Ext.create('Ext.button.Button', {
  18. renderTo: Ext.getBody(),
  19. text: 'My Button'
  20. });
  21. Ext.create('Ext.window.Window', {
  22. height: 400,
  23. width: 500,
  24. title: 'My Window',
  25. minWidth: 300,
  26. minHeight: 200,
  27. modal: true,
  28. layout: 'border',
  29. items: [
  30. {
  31. xtype: 'panel',
  32. region: 'west',
  33. width: 150,
  34. split: true,
  35. html: 'This is a panel'
  36. },
  37. {
  38. xtype: 'panel',
  39. region: 'center',
  40. html: 'In the center'
  41. }
  42. ],
  43. buttons: [
  44. {
  45. text: 'My Button',
  46. handler: function() {
  47. Ext.Msg.alert('You clicked', 'Do NOT click the button');
  48. }
  49. }
  50. ]
  51. }).show();
  52. });
  53. </script>
  54. </body>
  55. </html>