You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flex.apache.org by "Olaf Krüger (JIRA)" <ji...@apache.org> on 2014/12/21 13:19:13 UTC

[jira] [Created] (FLEX-34702) Flatspark Button: Changing fontSize at runtime has no effect

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)