PDA

View Full Version : 'flow' layout for a panel ?



dekely
25 Aug 2010, 11:32 PM
Hi All,
I'm working with version 3.2.1.
I would like to create a panel with 200px width that will contain several labels, each label will have a random font size.
I want to have the labels one after another but if no space left, start a new line (like a word wrap in TextArea).

any ideas?

Animal
25 Aug 2010, 11:33 PM
Use my FloatLayout UX class.

dekely
25 Aug 2010, 11:58 PM
Thanks for your reply.
I tried the following code but I don't see any of the labels in the panel



var pnlListWrapper = new Ext.Panel({
id: 'pnlListWrapper',
region:'center',
layout: 'float',
title: 'Topics',
autoScroll: true
});

var topicsPanel = Ext.getCmp('pnlListWrapper');
for (var i=0; i < 5; i++) {
var lbl = new Ext.form.Label({
html: 'Select input file for customer import'
});
topicsPanel.add(lbl);
}
topicsPanel.doLayout();

Animal
26 Aug 2010, 1:32 AM
Don't "see".

Doesn't mean they aren't there. Have you attempted one stroke of debugging?

dekely
26 Aug 2010, 3:01 AM
It works great now.
Maybe the browser was not refreshed.

Many thanks, great work