Paul, As I mentioned it was untested code. So here are the necessary changes: //Style RichEditableText
if (numberOfStyleColors > 4)
{
var cssStyleDeclarationRET:CSSStyleDeclaration = new CSSStyleDeclaration();
cssStyleDeclarationRET.setStyle("focusedTextSelectionColor", rolloverColor);
cssStyleDeclarationRET.setStyle("unfocusedTextSelectionColor", rolloverColor);
cssStyleDeclarationRET.setStyle("linkActiveColor", titleColor);
cssStyleDeclarationRET.setStyle("linkNormalColor", textColor);
cssStyleDeclarationRET.setStyle("linkHoverColor", titleColor);
topLevelStyleManager.setStyleDeclaration("spark.components.RichEditableText", cssStyleDeclarationRET, false);
var cssStyleDeclarationTI:CSSStyleDeclaration = new CSSStyleDeclaration();
cssStyleDeclarationTI.setStyle("chromeColor", textColor);
topLevelStyleManager.setStyleDeclaration("spark.components.TextInput", cssStyleDeclarationTI, false);
topLevelStyleManager.setStyleDeclaration("spark.components.TextArea", cssStyleDeclarationTI, false);
topLevelStyleManager.setStyleDeclaration("mx.controls.TextInput", cssStyleDeclarationTI, false);
topLevelStyleManager.setStyleDeclaration("mx.controls.TextArea", cssStyleDeclarationTI, false);
topLevelStyleManager.setStyleDeclaration("mx.controls.VSlider", cssStyleDeclarationTI, false);
topLevelStyleManager.setStyleDeclaration("spark.components.VSlider", cssStyleDeclarationTI, false);
topLevelStyleManager.setStyleDeclaration("mx.controls.HSlider", cssStyleDeclarationTI, false);
topLevelStyleManager.setStyleDeclaration("spark.components.HSlider", cssStyleDeclarationTI, false);
}
And replace the whole content of the DetailsWindow.mxml with this:<?xml version="1.0" encoding="utf-8"?>
<TOC:ResizeTitleWindow xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:TOC="widgets.TOC.*"
width="400" height="300"
title="{_detailsTitle}"
close="closeMe()"
cornerRadius="6"
skinClass="widgets.TOC.ResizeTitleWindowSkin"
initialize="resizetitlewindow1_initializeHandler(event)">
<TOC:layout>
<s:VerticalLayout horizontalAlign="center" verticalAlign="middle" />
</TOC:layout>
<fx:Script>
<![CDATA[
import flashx.textLayout.formats.TextLayoutFormat;
import flashx.textLayout.conversion.TextConverter;
import flashx.textLayout.elements.Configuration;
import flashx.textLayout.formats.TextDecoration;
import mx.events.FlexEvent;
import mx.managers.PopUpManager;
[Bindable] private var _content:String;
[Bindable] private var _detailsTitle:String;
[Bindable] private var textLayoutConfiguration:Configuration;
private function closeMe():void
{
PopUpManager.removePopUp(this);
}
public function set windowDetails(value:String):void
{
_content = value;
}
public function set detailsTitle(value:String):void
{
_detailsTitle = value;
}
protected function resizetitlewindow1_initializeHandler(event:FlexEvent):void
{
textLayoutConfiguration = new Configuration();
var textLayoutFormat:TextLayoutFormat = new TextLayoutFormat();
textLayoutFormat.color = getStyle("linkActiveColor")
textLayoutFormat.textDecoration = TextDecoration.UNDERLINE;
textLayoutConfiguration.defaultLinkActiveFormat = textLayoutFormat;
textLayoutFormat = new TextLayoutFormat();
textLayoutFormat.color = getStyle("linkHoverColor")
textLayoutFormat.textDecoration = TextDecoration.UNDERLINE;
textLayoutConfiguration.defaultLinkHoverFormat = textLayoutFormat;
textLayoutFormat = new TextLayoutFormat();
textLayoutFormat.color = getStyle("linkNormalColor")
textLayoutFormat.textDecoration = TextDecoration.UNDERLINE;
textLayoutConfiguration.defaultLinkNormalFormat = textLayoutFormat;
}
]]>
</fx:Script>
<s:Scroller width="100%" height="100%"
hasFocusableChildren="false"
measuredSizeIncludesScrollBars="false"
minViewportInset="1">
<s:RichEditableText editable="false"
paddingLeft="5"
paddingRight="5"
paddingTop="10"
backgroundAlpha="{getStyle('backgroundAlpha')}"
backgroundColor="{getStyle('backgroundColor')}"
textFlow="{TextConverter.importToFlow(_content, TextConverter.TEXT_FIELD_HTML_FORMAT, textLayoutConfiguration)}"/>
</s:Scroller>
<TOC:controlBarContent>
</TOC:controlBarContent>
<TOC:controlBarLayout>
<s:HorizontalLayout horizontalAlign="right" paddingTop="3" paddingBottom="2" paddingRight="5" clipAndEnableScrolling="true" />
</TOC:controlBarLayout>
</TOC:ResizeTitleWindow>