When creating a grid, I have textArea in the gridItems of the first
row for "headers". If I don't give them a height they default to
100%. I need the textArea to default to the size of the text within
them or somehow get the text within the textArea to valign="bottom",
which I haven't been able to produce. Anyone have any ideas?
I create a grid on the fly with AS. The following is part of the
code creating the "headers" of the grid.
//Create the Grid
grid1 = new Grid();
grid1.id = "griddy";
grid1.y=35;
grid1.percentWidth=100;
grid1.setStyle("backgroundColor","0xf1c616");
grid1.setStyle("verticalGap","1");
grid1.setStyle("horizontalGap","1");
addChild(grid1);
//Create the first Row with the Role labels
grid1row = new GridRow();
grid1row.id = "gRow";
grid1row.percentWidth=100;
grid1.addChild(grid1row);
//Create the first GridItem as a blank first cell
grid1Item = new GridItem();
grid1Item.id = "gItem0";
grid1Item.setStyle("horizontalAlign","center");
grid1row.addChild(grid1Item);
label1 = new TextArea();
label1.name = "gLabel0";
label1.width=90;
label1.text = " "
label1.alpha = 0;
grid1Item.addChild(label1);
//Loop through results,creating the headers to each column in the grid
for ( var i:Number=0;i<event.result.length;i++){
grid1Item = new GridItem();
grid1Item.id = "gItem"+i;
grid1Item.setStyle("horizontalAlign","center");
grid1Item.setStyle("verticalAlign","bottom");
grid1row.addChild(grid1Item);
label1 = new TextArea();
label1.name = "gLabel"+i;
label1.alpha = 0;
label1.width = 90;
if (event.result.list.source[i].roleName.length < 20){
label1.height = 35;
}else{
label1.height = 70;
}
label1.text = event.result.list.source[i].roleName
grid1Item.addChild(label1);
}
Thanks,
Precia
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/