3 * @class Roo.form.FieldSet
4 * @extends Roo.form.Layout
5 * @children Roo.form.Column Roo.form.Row Roo.form.Field Roo.Button Roo.form.TextItem
6 * Creates a fieldset container for layout and rendering of fields in an {@link Roo.form.Form}.
8 * @param {Object} config Configuration options
10 Roo.form.FieldSet = function(config){
11 Roo.form.FieldSet.superclass.constructor.call(this, config);
14 Roo.extend(Roo.form.FieldSet, Roo.form.Layout, {
16 * @cfg {String} legend
17 * The text to display as the legend for the FieldSet (defaults to '')
20 * @cfg {String/Object} autoCreate
21 * A DomHelper element spec used to autocreate the fieldset (defaults to {tag: 'fieldset', cn: {tag:'legend'}})
25 defaultAutoCreate : {tag: 'fieldset', cn: {tag:'legend'}},
28 onRender : function(ct, position){
29 Roo.form.FieldSet.superclass.onRender.call(this, ct, position);
31 this.setLegend(this.legend);
36 setLegend : function(text){
38 this.el.child('legend').update(text);