<disablezoomtomenuoption>false</disablezoomtomenuoption>
Paul, That color is just the default that come from Adobe Flex in general for hyperlinks. To fix that you will have to modify the UIManager.as.UNTESTED changes: //Style RichEditableText if (numberOfStyleColors > 4) { var cssStyleDeclarationRET:CSSStyleDeclaration = new CSSStyleDeclaration(); cssStyleDeclarationRET.setStyle("focusedTextSelectionColor", rolloverColor); cssStyleDeclarationRET.setStyle("unfocusedTextSelectionColor", rolloverColor); cssStyleDeclarationPopUpRendererLink.setStyle("linkActiveColor", titleColor); cssStyleDeclarationPopUpRendererLink.setStyle("linkNormalColor", textColor); cssStyleDeclarationPopUpRendererLink.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); }
//Style RichEditableText if (numberOfStyleColors > 4) { var cssStyleDeclarationRET:CSSStyleDeclaration = new CSSStyleDeclaration(); cssStyleDeclarationRET.setStyle("focusedTextSelectionColor", rolloverColor); cssStyleDeclarationRET.setStyle("unfocusedTextSelectionColor", rolloverColor); cssStyleDeclarationPopUpRendererLink.setStyle("linkActiveColor", titleColor); cssStyleDeclarationPopUpRendererLink.setStyle("linkNormalColor", textColor); cssStyleDeclarationPopUpRendererLink.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); }
//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); }
<?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>
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; }
cssStyleDeclarationRET.setStyle("linkNormalColor", titleColor);
<layer label="Status" type="feature" visible="false" token="A90av3k6cC75HbsYVMqpVfulDk3UsfhnZb1TDx0KBesmAIfjCf7puQU6gAQ25fnVpQ2RX6KQxQVwOie9B6nMVw.." url="http://orator-s.epa.gov/ArcGIS/rest/services/R9ER/EPAR9RemovalWOaklandOpsR9ER/FeatureServer/4"/>
<layer label="Status" type="feature" visible="false"" url="http://orator-s.epa.gov/ArcGIS/rest/services/R9ER/EPAR9RemovalWOaklandOpsR9ER/FeatureServer/4?token=A90av3k6cC75HbsYVMqpVfulDk3UsfhnZb1TDx0KBesmAIfjCf7puQU6gAQ25fnVpQ2RX6KQxQVwOie9B6nMVw.."/>
Paul, It should be just a change in the UIManager and nothing in the DetailsWindow.
cssStyleDeclarationRET.setStyle("linkNormalColor", textColor);
textLayoutFormat.color = getStyle("linkNormalColor") textLayoutFormat.textDecoration = TextDecoration.UNDERLINE; textLayoutConfiguration.defaultLinkNormalFormat = textLayoutFormat;
Hi,I recently downloaded the TOC widget, which I was able to add in the Flex Viewer. I am inexperienced with widgets and xml code, but I would really like to build a web map application that utilizes this functionality. I read the ReadMe file and scanned the forum but still do not know what to do next. Right now in preview mode the TOC is blank except for the words "Layer Visibility." I'm assuming that's because I haven't modified the xml code. I am using arcgis for organizations/hosted services thru arcgis.com. I would appreciate any feedback or links re: next steps, e.g., what lines of code I need to address. Thank youKim
Hi Kim; All you need is add the lines to your config file. Are you using Flexviewer 2.5 or 3.0? Remark you cannot use this widget with the LayerListWidget and or MapSwitcherWidget with the layerlist visible="true". If post here your config and TOCWidget I can take a look.
Hi Jefferson - Thank you for your reply. I am using Flexviewer 3.0. I turned off the MapSwitcherWidget and am not using the LayerListWidget. Please see attached image of TOC widget settings. Is this the config that you refer to? Kim
I tried to make the edit in the configure window of the App Builder, but the change doesn't hold. When I save and return to the config window, it shows that it has reverted back. Is there someplace else where I should be making the edit?Thanks
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.