PDA

View Full Version : Render slider in a portal



manuito
24 Feb 2010, 3:42 AM
I have problems to render a slider in a portal. I think that I have a incorrect code.


var optConfigurar={
id:'config',
xtype: 'portal',
title: 'My tittle',
iconCls: 'x-icon-configuration',
tabTip: 'My Tip',
style: 'padding: 10px; ',
items:[],
html:"<div style='text-align:center;' id='slider_config'></div>"
}

var mySlider = new Ext.Slider({
renderTo: 'slider_config',
width: 214,
increment: 1,
minValue: 1,
maxValue: 6
});
Somebody can help me??

Animal
24 Feb 2010, 4:09 AM
What does it say here?

http://www.extjs.com/deploy/dev/docs/?class=Ext.Component&member=render

manuito
24 Feb 2010, 4:43 AM
With doLayout?


var myDiv = Ext.getCmp('slider_config');
myDivr.add(mySlider); // Error: myDivr.add is not a function
myDiv.doLayout();can be more explicit? I tried a thousand different things and none work for me.

Animal
24 Feb 2010, 4:58 AM
If you take the "inifinite monkey" approach, then your project will take an infinite time to complete.

Do not try things at random.

manuito
24 Feb 2010, 5:03 AM
anyone else can help me?

Animal
24 Feb 2010, 5:31 AM
Learn. The. Principle.

Put a Component into a Container using items.

Ensure you have configured the Container with the layout that you want.

That's it.

If you manage to learn that hugely complex concept, you will be ahead of 90% of posters.

manuito
25 Feb 2010, 3:52 AM
The best way to learn is with code examples and not with philosophical phrases. This very well everything you say but I still find solution to my problem.

Finally the solution is not to use Extjs components.