fontSize is a style, not a property. To set fontSize, use
myComponent.setStyle("fontSize", 40);Easiest way to work out what's what is to look at the flex docs. 2009/2/18 secrit.service <[email protected]>: > Hi all, > > I'm new to Flex, so I will probably ask some simple questions. > However to me they look huge. > One of the situations I encounter now is following : > > filename = Application.mxml > --------------------------- > <Application> > <script source = "Application.as"/> > <CustomComponent id="myComponent"/> > </Application> > > > filename = CustomComponent.mxml > ------------------------------- > <Text> > <script source = "CustomComponent.as"/> > > </Text> > > > filename = Application.as > ------------------------- > Because my Custom Component is based on a Text, I want to set the > fontsize. Therefore I want to write a line of code like this : > > myComponent.fontSize = 40; > > But when I write myCo and press Ctrl+Space it does not recognize my > component. When I write the scriptcode inside the mxml-file, there is > no problem. > > > filename = CustomComponent.as > ----------------------------- > When I want to set a property of the component, which is accessible > via mxml, it wont work. > > When I write this.fontSize = 40; > > It will even not recognize the property fontSize. > > > Can anyone give me an explanation for this behavior? > > Thanks in advance > > > > > > > > > > > > > > > > > ------------------------------------ > > -- > Flexcoders Mailing List > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt > Alternative FAQ location: > https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 > Search Archives: > http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links > > > >

