flex-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Olaf Krüger (JIRA) <j...@apache.org>
Subject [jira] [Created] (FLEX-34702) Flatspark Button: Changing fontSize at runtime has no effect
Date Sun, 21 Dec 2014 12:19:13 GMT
Olaf Krüger created FLEX-34702:
----------------------------------

             Summary: Flatspark Button: Changing fontSize at runtime has no effect
                 Key: FLEX-34702
                 URL: https://issues.apache.org/jira/browse/FLEX-34702
             Project: Apache Flex
          Issue Type: Bug
    Affects Versions: Apache Flex 4.14.0
            Reporter: Olaf Krüger


Changing the buttons 'fonSize' style at runtime by e.g. using a slider has no effect:

{Code}
<s:HSlider id="sdFontSize"  minimum="10" maximum="500" />
<s:Button id="btn" label="test" fontSize="{sdFontSize.value}"  />
{Code}

I've tried to fix this and found that moving the 'fontSize' population from  'initializationComplete()'
to  'updateDisplayList()' works like a charme:

{code}
override protected function initializationComplete():void
{
...
// Set 'fontSize' here cause doing this inside the 'labelDisplay' results in an error
// labelDisplay as Label).setStyle("fontSize", fontSize);
...
}


override protected function updateDisplayList(...) : void
{
...
super.updateDisplayList(unscaledWidth, unscaledHeight);
				
// Set 'fontSize' here cause doing this inside the 'labelDisplay' results in an error
labelDisplay as Label).setStyle("fontSize", fontSize);
}
{code}

Cause I'm not a 'high level' Flex programmer I don't know if doing this results in other bugs.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message