DGColumn extends CSSStyleDecl and is assigned as the styleName property
of each renderer.  When you call setStyle, you are adding new styles
that each renderer will pick up, just as if it were a normal CSS
selector.

 

I would expect "icon", MyIconClass to work.

 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Dave Glasser
Sent: Monday, December 31, 2007 9:39 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Icon for Button

 

Alex,

 

This looks like a very useful piece of information, of which I was not
previously aware. It's not quite clear to me what you mean, however.
Could you expand on it a little, or else point me to some documentation
that does?

 

When you say "the column" is the styleName, what exactly do you mean? Is
that the column header text, or perhaps the dataField property of the
DataGridColumn?

 

Also, since the DataGridColumn class extends CSSStyleDeclaration, what
would be the effect of calling setStyle("icon", MyIconClass) on the
DataGridColumn object itself?



Alex Harui <[EMAIL PROTECTED]> wrote:

        

        The styleName for all renderers is the column it belongs to.

        
        
________________________________


        From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of markgoldin_2000
        Sent: Thursday, December 27, 2007 8:35 AM
        To: flexcoders@yahoogroups.com
        Subject: [flexcoders] Icon for Button

        I want to have a button in one of columns in the DataGrid. This
button 
        will delete rows on its click. I am adding the button to
dataGrid as a 
        itemRenderer. I am extending class Button:
        public class deleteRowGrid extends Button
        {public function deleteRowGrid()
        {
        super();
        styleName = "DeleteRow";
        }
        
        }
        I am using styleName to set an icon for the button. "DeleteRow"
style 
        is declared in the main application. When I run my code I have a
button 
        in the column but with no icon. Any idea why?
        
        Thanks

 

 

Reply via email to