No Label for field when they are in TableLayout or ColumnLayout

6 views
Skip to first unread message

gseroul

unread,
May 7, 2009, 9:14:23 AM5/7/09
to PHP-Ext
Hi,
I created a set of radio button (also tested with textfiled). I want
to have the different fields on the same line.
When adding these fields into a panel with TableLayout or ColumnLayout
(with other layout fields are verticaly added) I can see the field but
no more the label. I tried lots of tricks but nothing work.

Here is my code :
$radioPanel = new PhpExt_Form_FieldSet();
$radioPanel->setAutoHeight(true);
$radioPanel->setTitle("Class of risk");
$layout = new PhpExt_Layout_TableLayout();
$layout->setColumns(4);
$radioPanel->setLayout($layout);

$radioPanel->addItem(PhpExt_Form_Radio::createRadio("risk_radio", "1",
null, 1)->setLabelSeparator(""));
$radioPanel->addItem(PhpExt_Form_Radio::createRadio("risk_radio", "2",
null, 2)->setLabelSeparator(""));
$radioPanel->addItem(PhpExt_Form_Radio::createRadio("risk_radio", "3",
null, 3)->setLabelSeparator(""));
$radioPanel->addItem(PhpExt_Form_Radio::createRadio("risk_radio", "4",
null, 4)->setLabelSeparator(""));

If someone have a way to have these radio fields on a single line with
label (1,2,3,4) please tell me ;-)
Reply all
Reply to author
Forward
0 new messages