the styles and events can be set in mxml if they are defined using the Style and Event metadata tag (This is just for convenience). However, in actionscript, they should still use the setStyle method to do so.
--- In [email protected], "Seth Caldwell" <[EMAIL PROTECTED]> wrote: > > Well, I solved the problem by using > adgc.setStyle("headerStyleName","someStyle"); - however I'm still confused > as to how there are attributes you can specify in mxml that can't be set > programmatically. > > I've encountered this elsewhere also - is it just a styles thing? > > > > Seth > > > > From: [email protected] [mailto:[EMAIL PROTECTED] On > Behalf Of Seth Caldwell > Sent: Friday, December 21, 2007 11:20 AM > To: [email protected] > Subject: [flexcoders] setting mxml attributes in actionscript when those > properties don't exist > > > > For example, I'm wanting to set the headerStyleName on an > AdvancedDataGridColumn. which you can do with mxml: > <mx:AdvancedDataGridColumn headerStyleName="someStyle"/> > > However, when I try to do it with actionscript: > > > > var adgc:AdvancedDataGridColumn = new AdvancedDataGridColumn(); > > adgc.headerStyleName = "someStyle"; > > > > I get the error that headerStyleName is not defined on > AdvancedDataGridColumn. > > Huh? > > > > Whats going on here, and how can I set it programmatically? > > > > Thanks, > > > > Seth >

