Manish, I did try that ...
For example, in the CellRenderer if I use a mx:Text it displays the % 
value but does not work for anything else such as mx:Image or mx:HBox.

<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.macromedia.com/2003/mxml"; 
width="100%" xmlns="*">
<mx:Script>
<![CDATA[
function setValue(str:String,obj:Object) {
        var theRank = str+"%";
        rankBar.text = theRank;
// This does not :-(
//      colorBar.width = theRank; 
}

]]>
</mx:Script>
<mx:Text id="rankBar" />
<mx:Image id="colorBar" />
</mx:Canvas>



--- In [email protected], Manish Jethani 
<[EMAIL PROTECTED]> wrote:
> On 5/12/05, sreejithunni <[EMAIL PROTECTED]> wrote:
> > The "str" is a variable! that gets passed on to the cellRenderer 
from
> > the dataprovider of the datagrid. If, the value passed on is x, I 
want
> > to set the width of the image to x%.
> 
> So why not do the following?
> 
>  colorBar.width = str + "%";




 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> 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/
 


Reply via email to