Change the color of the selected TEXT to line Spark DataGrid

Hello

Does anyone know of a way to change the color of the text of the selected line in a spark DataGrid? I am able to change the color of flipping, etc, but can't seem to find a way to change the color of the text.

Let's say the default value is black for all lines. I want to make the color of the text of the line selected, for example, red. Ideas through CSS or Skinning?

Thank you

Victor

I think you need to create a custom item Renderer.

If you use FlashBuilder, just ask to a default one for you and look at the code.

I wil put a code here, but everything will be guess I can't check my answer just now. So what I write may be incorrect. I'll look again to change you

NOTE PLEASE. WHAT CAN BE WRONG. I JUST TRIED TO REMEMBER OFF THE TOP OF MY HEAD!

http://ns.Adobe.com/MXML/2009.

xmlns:s = "library://ns.adobe.com/flex/spark".

xmlns:MX = "library://ns.adobe.com/flex/mx".

clipAndEnableScrolling = 'true '.

override public function discard(willBeRecycled:Boolean):void

{

Super.Discard (willBeRecycled);

}

override public function prepare(hasBeenRecycled:Boolean):void

{

if(Data && Selected)

{

lblData.setStyle ("color", 0xffff00);

Search for the 'format' function

If (column.labelFunction! = null)

{

lblData.text = column.labelFunction (data, column);

}

on the other

{

lblData.text = data [column.dataField];

}

}

Super.Prepare (hasBeenRecycled);

}

]]>

Tags: Flex

Similar Questions

  • How change the style header font in Spark DataGrid?

    I'm looking for the week last for a way to change the font style of the header in a DataGrid of Spark control. It make me crazy that I can't find a way to do this. Have anyone a idea how? Any help is appreciated.

    Thank you

    -Artur

    Hello

    Some styles will not work because some styles of hardcoded in Label text of the DefaultGridHeaderRenderer. You will encounter this problem not only with the DataGrid headers, but also things like title of the Panel and other places where we have the text. To work around this problem is to create your own custom its based on the default and then redefine the part of skin its in the skin.

    First, create a subclass of the DefaultGridHeaderRenderer and twist the "labelDisplay" to your liking (or even just out of all styles and style on your own that you were previously using the name of your custom header rendering engine). Example below (I named it "CustomHeaderRenderer"):

    
    
    
        
    
            
            
        
    
    
    

    Next, create a simple skin of DataGrid by creating a subclass of the spark.skins.spark.DataGridSkin in MXML and setting a new component its in the fx:Declarations section. Example below (I named it "CustomDataGridSkin"):

    
    
    
        
    
            
            
                
            
    
        
    
    
    

    Finally, assign your new skin as the skinClass of your DataGrid (be it in MXML or as a style):

    
        ....
    

    I know it's not pretty, but it is the result of trading off between having fully customized skinning vs having buttons to set all styles. I hope this helps.

    -Kevin

  • Dreamweaver CC: How to change the color of the selected text

    Maybe a stupid question, but I can't seem to figure it out, even with searches on the web.  I want to change the color of a single word in my HTML document.  Can anyone offer advice?

    I can change some styles of the selected text (bold, italic, etc.), but do not understand the color.

    Also, I know how to change the color of the different elements using CSS.  But for the selected text in an element, CSS here the simplest solution?

    Thanks in advance.

    carlg79335635 wrote:

    Thank you for that.  But I don't have a color option in my menu format.  It ends at some CSS Styles.  I have to allow him anywhere?  I use Dreamweaver CC.

    Yes.  I checked it and in CC DW, there is not a way to do as I suggested previously.  I was watching DW CS6 and he got it.

    Looks like you'll need to teach how them to manually code.  This will make them think about what they are doing and so concentrate better.

  • Script to change the selected layer to one of the drop-down list in the layers palette colors

    Hello!

    I was wondering if anyone knows of a script that would allow me to change the selected layers (single or multiple selection) in 'Light Blue' or all the colors in the menu drop-down? (see attached screenshot)

    I found the following but it changes all layers and is the RGB color.

    -----

    say application "Adobe Illustrator"

    set current_Layer in current document

    view the dialog box "in the current document there is" & layersCounter & "layers." & "Recolor label layers?"

    Repeat until (layersCounter = 0)

    set color of layer layersCounter in the current document to {Light Blue}

    set layersCounter to layersCounter - 1

    end Repeat

    end say

    -----

    Screen Shot 2015-06-12 at 10.46.46 AM.png

    I don't know how the script so any help is greatly appreciated. Thank you in advance!

    John

    as far as I can tell this is only possible with a few other modifications... Since 'selected' is not a property of "layers" javascript cannot determine if you see a highlighted layer in the layers panel.

    you could do one of 2 ways. Depending on how many layers you want to change the color, you can either make those visible or hidden (for example, if you want to change to 80% of the layers of a specific color, hide others 20%). and then simply add a clause inside the loop if for.

    var doc = app.activeDocument;

    var layers = doc.layers;

    Blue of var = new RGBColor();

    Blue.Red = 79;

    Blue.Green = 128;

    Blue.Blue = 255;

    for (i = 0; i<>

    If (layers [i] .visible == true) {}

    var = aLay layers [i];

    aLay.color = blue;

    }

    }

  • I'm LR4 running on a pc. Control-Q does not close the program. (Sometimes it changes the selected color to b &amp; w image.) I was closing the window by right-clicking on the LR icon in the taskbar and selecting "close window." Is - it really close the

    I'm LR4 running on a pc. Control-Q does not close the program. (Sometimes it changes the selected color to b & w image.) I was closing the window by right-clicking on the LR icon in the taskbar and selecting "close window." Is this really close the program? (It also changes an image n & b).

    -> Output file, or by clicking on the red X in the upper right, should work.

    CTRL-Q should work unless there is a Windows keyboard command that replaces it.

  • Replace the selected text with other content TextFrame

    Hello

    I am changing a text selected in something new, involving the movement of text and the paragraph style using a jsx script. At the present time, everything works beautifully:

    • I entered the select text
    • I have create a new temporary TextFrame
    • I build my new paragraphs and apply styles to them in the new TextFrame

    What I was not able to reach still is to replace the original selected text by temporary TextFrame content.

    Any help would be more than welcome

    A part of my script:

    myText = app.selection[0].contents;

     

    ... do some stuff


    var myDocument = app.documents.item(0);

    var myPage = myDocument.pages.item(0);

    var myTextFrame = myPage.textFrames.add();


    myTextFrame.geometricBounds = [0, -70, 150, 70];

    myTextFrame.contents = "Paragraph1\rParagraph2...";


    myTextFrame.paragraphs[0].appliedParagraphStyle = pStyleGroup.paragraphStyles.itemByName('Style1');

    myTextFrame.paragraphs[1].appliedParagraphStyle = pStyleGroup.paragraphStyles.itemByName('Style2');

    And now, in myTextFrame, I have my new paragraph formatted, and I would like to replace the original selected text with the contents of my TextFrame (keeping the paragraph styles).

    Hello

    Keep the logic of the code and edit utilities:

    var
        mSourceIdx = app.selection[0].index,
        mStory = app.selection[0].parentStory,
        mReplaceStuff = {
            elements: [
                ["Paragraph_1\r",  "Style_1"],
                ["Paragraph_2\r",  "Style_2"],
                ["Paragraph_X\r",  "Style_X"]
                ]},
        mTarget, cElement, cText, cParaStyle;
    
    while (cElement = mReplaceStuff.elements.pop()) {
        cText = cElement[0];
        cParaStyle = app.activeDocument.paragraphStyles.item(cElement[1]);    // modify if styleGroups present in a structure
      mTarget = mStory.insertionPoints.item(mSourceIdx);
        mTarget.contents = cText;
        mTarget.paragraphs[0].appliedParagraphStyle = cParaStyle;
         }
    
    app.selection[0].contents = "";
    

    MReplaceStuff allows to prepare stuff to replace

    Jarek

  • How to change the header text in a sensitive presentation of HTML5

    I work in HR 11.0.4.291.

    This is probably a "duh" question, but I can't remember how to change the title text in the header of a sensitive layout. In the layout editor, I see that I can change the title, color and color of hover font, but where you change the actual text?

    Any help will be much appreciated.

    Can also be the title bar?

    See you soon... Rick

  • How to search the selected text with a default search engine?

    Hello

    Before the recent update of the search bar, you can select your 'current' search engine, and a search for the selected text (right click on the selection) would use this engine.

    Now, it seems that you can only search for the selected text using the default engine. If that is correct, it's a big step backwards for me. For example, I can't have Google as my default search engine and the search for a text selected on eBay!

    Or am I missing something?

    Thank you!

    R.

    I find this extension very useful for selected items in the web pages. It offers all your search engines with select > right click.
    https://addons.Mozilla.org/en-us/Firefox/addon/context-search/?src=search

  • How to dynamically change the selection mode of the listbox control?

    Hello everyone

    Is it possible to change the selection mode of the ListBox dynamically?

    Both cases to the attached vi works the same way. I want the listbox to change the mode of selection by 1 point when the channel selected in the drop-down list box is SET.

    Can anyone help please?

    Thank you

    Simo

    There is a property for Listboxes node called selection Mode.

    Do not use the control Terminal in one case and a local variable of it in the other.  Moving the Terminal outside the structure of matter and son in the structure of the case.

  • How to get the 'selected text '? leave a string

    If I highlight text in a text string, I want to be able to copy it to the Clipboard.

    I have already created an event that uses the Application of reference to 'write the Clipboard' now I need to give it the selected text.

    How do I do that?

    Here's a way to do it.

    Ben64

  • Programmatically change the selected cell/line of control multi-column listbox

    I want to programmatically change the selected cell of a multicolumn list box whose selection Mode is set to highlight the whole line.  I would use this to highlight the line whatever the list box, I chose to.  It would work the same way if the user has clicked on a line to select and highlight that particular line.  Set Active cell does not fulfill this.

    Steve

    Try to use the property value; p

  • Retrieve the selected text

    Hello

    I just know how I can retrieve the text selected via the Menu:

    I add a MenuItem to the category system so that it is available everywhere:

    ... ApplicationMenuItemRepository.getInstance().addMenuItem(ApplicationMenuItemRepository.MENUITEM_SYSTEM,this);...
    

    Then after that I selected the text in the browser for example, I click on the Menu button:

    public Object run(Object context) {
      if ( context instanceof ) {
        //do something with the selected Text    ...
      }
    }
    

    It should allow me to do something with the text I've selected. What instance is that the text of selected?

    Can someone help me here?

    Thank you in advance!

            if (fld.isSelectionCopyable()){
                Clipboard cd = Clipboard.getClipboard();
                fld.selectionCopy(cd);
                Object s3 = cd.get();
            //(....)
    

    On the second reading of your code, you do not use the Clipboard correctly. Try the above.

  • Cannot get the "&lt; FEFF &gt;" string in the selected text [indesign CS6]

    Hello world!

    I can't get the string to the selected text. The selected text contains several xml tags.

    In adobe indesign cc version of 2014, the selected text is bring the string «< FEFF >» tags

    In indesign adobe cs6 version cannot get the string "< FEFF >. they do ""-empty space.

    Screen Shot 2015-09-23 at 6.01.25 PM.png

    Are the above-selected text contains several xml tags.

    but I get content using script code can't get the string.

    Screen Shot 2015-09-23 at 6.02.51 PM.png

    the script gives the result, xml tags are converted to "". ""  I expect "< FEFF >.

    I expect the output is: "< FEFF > Applescript < FEFF > < FEFF > selected text < FEFF > < FEFF > < FEFF >."

    Please help me...

    Thank you

    John Peter.

    the script gives the result, xml tags are converted to "". ""  I expect to ''.

    The xml tags are not converted to "" but "\uFEFF" (zero-width space non-bec), it is the character used to represent the tags in a text frame. Looks like the apple script converts a hexadecimal representation unicode values.

  • Bridge continues to change the selection of the sort each time that I reopen it the Bridge window... WHY?

    Bridge continues to change the selection of the sort each time that I reopen it the Bridge window... WHY?

    I continue to get "sort by modified date" but each whenever I open it a window that it is for manual selection.

    I searched the preferences but impossible to find something to help.  It didn't used to do this...

    John

    Well, I solved the puzzle myself.

    I noticed that somehow a stray .psd file was stuck in my side bar of the Mac Finder.  Don't ask me how it got there.

    At the beginning I couldn't delete it – until I tried a Mac forum and they suggested I hold down the command key and drag it off... to poof!

    It worked.

    And when I went back to bridge - now the bad behavior disappeared!  And when I close the window Bridge and reopen - the choice to "classify" same home!

    Yay... it's a small step for me, and one small step for computerkind.

  • iterate threw the params to datacontoller when changing the selection of a LOV

    Hello guys, I have a LOV Drivin' since a datacontrol, lets say the list of employees, the LOV has the employee name attribute as a value, how can I get this pragmatic Java employee ID when I change the selection LOV? uses JDev12.c thanks in advance

    Try something like

    BindingContext lBindingContext = BindingContext.getCurrent ();

    BindingContainer lBindingContainer = lBindingContext.getCurrentBindingsEntry ();

    List JUCtrlListBinding = lBindingContainer.get ("your_lov") (JUCtrlListBinding);

    get the new index

    int newindex = (Integer) valueChangeEvent.getNewValue ();

    get list data

    Line object = list.getDisplayData ();

    Line lFromList = (Row) list.getValueFromList (newindex);

    Object lAttribute = lFromList.getAttribute ("Id");

    Timo

Maybe you are looking for