Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-35118

focusedTextSelectionColor suppresses the characters in the textinput when set to black

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Not A Bug
    • Adobe Flex SDK 4.6 (Release)
    • None
    • Spark: TextInput

    Description

      When text is selected in spark textinput component , background color of text is light blue.The behavior in mx component is different, since the background color of text is black.

      I tried to use the setStyle method to change the background color of the text , but setting the value to black overwhelms the characters that have been selected in the TextInput.

      Can you please provide a resolution so that behavior of mx and spark text input is same.

      Sample Code here:

      <?xml version="1.0" encoding="utf-8"?>
      <s:Application xmlns:s="library://ns.adobe.com/flex/spark"
                     xmlns:mx="library://ns.adobe.com/flex/mx"
                     xmlns:fx="http://ns.adobe.com/mxml/2009"
                     minWidth="300"
                     minHeight="400">
      
      	<fx:Script>
      		<![CDATA[
      			import mx.events.FlexEvent;
      			protected function test_selectionChangeHandler(event:FlexEvent):void
      			{
      				// TODO Auto-generated method stub
      				test.setStyle("focusedTextSelectionColor", "##000000" );
      			}			
      		]]>
      	</fx:Script>
          <s:VGroup>
      
      		<s:Label text="①TextInput">
      		</s:Label>
      		<mx:HBox>
      			<mx:VBox>
      				<s:Label text="↓mx.controls.TextInput">
      				</s:Label>
      				<mx:TextInput width="200" text="サンプル">
      				</mx:TextInput>
      			</mx:VBox>
      			<mx:VBox>
      				<s:Label text="↓spark.components.TextInput">
      				</s:Label>
      				<s:TextInput id="test" width="200" text="サンプル" fontFamily="U-PRESS" selectionChange="test_selectionChangeHandler(event)">
      				</s:TextInput>
      			</mx:VBox>
      		</mx:HBox>
          </s:VGroup>
      </s:Application>
      
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            abangroo Ankush Bangroo
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: