I studied the ext layout over the weekend and found that the previous things were troublesome. Now it seems very simple. The use of ext is not particularly difficult, but how can we ensure that ext can meet various abnormal page requirements while preventing developers from getting in touch with a bunch of JS? This is definitely a problem.
Or clickCode. The following code uses the table mode to layout formpanel. The label cannot be displayed in non-form mode, but there are still problems. For example, generally, "Start Date" and "End Date" only occupy one column, that is, two elements each occupy half of the column.
This is the main code,Source codeIt is reproduced on the Internet.
<SCRIPT type = "text/JavaScript"> function getbodywidth () {return document. body. clientWidth-15;} function func_submit_onclick () {alert ('hello');} VaR _ bodywidth = getbodywidth (); // VaR _ bodywidth = 900; VaR _ columns = 3*2; vaR _ perwidth = _ bodywidth/_ columns; Ext. onready (function () {Ext. quicktips. init (); var tableform = new Ext. formpanel ({Name: 'tableform', ID: 'tableform', frame: True, // width: _ bodywidth + 30, layout: 'table', style: 'height: 100% ', // bodystyle: 'padding: 8px 0 0 0;', // top-right-bottom-left layoutconfig: {columns: _ columns}, title: 'tableform', ults: {border: false, bodystyle: 'padding: 8px 0 0 0; ', layout: 'form', frame: false, labelalign: 'right ', labelwidth: 75, width: _ perwidth * 2, height: 30}); tableform. add ({colspan: 2, items: {xtype: 'textfield ', fieldlabel: 'First name', anchor: '000000'}); tableform. add ({colspan: 2, items: {xtype: 'textfield ', fieldlabel: 'First name', anchor: '000000'}); tableform. add ({colspan: 2, items: {xtype: 'textfield ', fieldlabel: 'First name', anchor: '000000'}); tableform. add ({colspan: 1, width: _ perwidth, items: {xtype: 'datefield ', fieldlabel: 'First name', anchor: '000000'}); tableform. add ({colspan: 1, width: _ perwidth, labelalign: 'center', items: {xtype: 'datefield ', fieldlabel: 'to', anchor: '000000'}); tableform. add ({colspan: 2, items: {xtype: 'textfield ', fieldlabel: 'First name', anchor: '000000'}); tableform. add ({colspan: 2, items: {xtype: 'textfield ', fieldlabel: 'First name', anchor: '000000'}); tableform. add ({colspan: 2, items: {xtype: 'den den ', fieldlabel: 'First name', anchor: '000000'}); // hide a column, used for blank column layout tableform. add ({colspan: 4, width: _ perwidth * 4, items: {xtype: 'textfield ', fieldlabel: 'First name', anchor: '200 '}}); tableform. addbutton ({text: 'submit ', Handler: func_submit_onclick}); tableform. addbutton ({text: 'cancel'}); tableform. render (ext. getbody () ;}); </SCRIPT>
I want to extend the display to three interfaces: 1: full-screen display of rows and columns; 2: Display of rows and columns in a local area; 3: Display of rows and columns nested in other containers (such as Windows;
Method 1