PDA

View Full Version : ADD items into FieldSet from code?



intro
15 Aug 2010, 8:03 AM
Hi is it possible to add item into FieldSet with code?, I am working with designer.
htmlHR is FieldSet AutoRef.


Some thing like this..(tinymce)

Thanks in advance..



var htmlHR= this.htmlHR;

htmlHR.items = {
xtype: "tinymce",
stateful: false,
hideLabel: true,
id: "HTMLHR",
name: "HTMLHR",anchor: '100% 100%',

tinymceSettings: {
relative_urls : false,
remove_script_host : true,
theme : "advanced",
plugins: "filemanager,imagemanager,safari,pagebreak,style,layer,table,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,noneditable,visualchars,nonbreaking,xhtmlxtras,template",
theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect",
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|",
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : false,
extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]"
}};

jarrednicholls
15 Aug 2010, 7:46 PM
Sure of course, see the "add" function: http://dev.sencha.com/deploy/dev/docs/?class=Ext.Container&member=add

You can do an add() call in the initComponent function, or really at any point in time. But, if you do it after the Container is rendered and has laid out its children, then you must call doLayout() on the container in order to re-layout the new component that you have added.

Hope that helps!

intro
16 Aug 2010, 9:40 AM
Thanks it is working ,thank you again...