Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
Adobe Flex SDK 3.0 (Release)
-
None
-
None
-
Affected OS(s): All OS Platforms
Language Found: English
Description
Steps to reproduce:
1. The Text control doesnt support the styleSheet property (but TextArea does).
Also, the same thing applies to the Label control, which may be useful to add since you may want to do a simple label with a hyperlink, and this would make it much easier to style.
Actual Results:
The Text class has no public styleSheet property that you can set via MXML
Here is the offending code from Label.as (lines 936-954 in the 3.3 SDK)
//----------------------------------
// styleSheet
//----------------------------------
/**
- @private
*/
mx_internal function get styleSheet():StyleSheet { return textField.styleSheet; }
/**
* @private
*/
mx_internal function set styleSheet(value:StyleSheet):void
{ textField.styleSheet = value; }
Expected Results:
The Text control should publicly expose the styleSheet property (without having to use mx_internal).
//----------------------------------
// styleSheet
//----------------------------------
/**
* <some docs>
*/
public function get styleSheet():StyleSheet
{ return textField.styleSheet; }
/**
- @private
*/
public function set styleSheet(value:StyleSheet):void { textField.styleSheet = value; }
Workaround (if any):
You need to set the style sheet on the Text control's mx_internal::styleSheet object (inherited from Label) – see attached file for examples
Or extend the Text class and create your own public styleSheet property which proxies the mx_internal version.