Changing text color of item renderer in datagrid

Hi,
I have the following datagrid:
<mx:DataGridColumn field="name" ......... />
<mx:DataGridColumn itemRenderer="myRenderer" ...... />
In myRenderer, I extend from the TextInput class; with the
text color:WHITE
My question is:
When I do a mouse rollover/selection on any row of the
datagrid, how can I change the text color of my renderer?
If I add the rollover/selection event listener for my
renderer, it will only change the color when my mouse is over its
column.
I want it to change colour whenever the row is selected/
rollover.
Thank you very much.
Regards,
hy

Hi,
The rollOverColor and selectionColor style on the Datagrid
will only work for the normal columns.
Since my column extends from the TextInput, the rollOverColor
and selectionColor style does not seem to have any effect on the
itemrenderer.
hy

Similar Messages

  • Easy one I hope: How do I change text color?

    For the life of me I can't seem to find anything with a color pallette (except for background fill). I need to change text color but don't know where to find it.  Everything's always black. When I highlight the text, and goto "Font", I see something that looks like the "Select Text Color" (like the one above but as soon as you mouse over it, it turns to a crossed-out "ABC", and can't get the pallette.
    Thanks for your help.

    Hi,
    Question: Are these fields that you had changed the type of in the Object Pallet/Field Tab/Type ? If so, try deleting the object and put a new one in its place from the Object Library.
    If no, what sort of parent do these items have? Table Row? or SubForm?
    Good luck!
    Stephen

  • Why am I unable to change text color from black in LR5 book module?

    Why am I unable to change text color from black in LR5 Book Module?

    I'm assuming you clicked on the color patch besides the word <Character> to open the color picker window.
    At the right side of this window there is a vertical bar that has 2 horizontal black lines at the bottom.
    This is actually a slider. Pull it upwards with the color picker and color will appear in the window.

  • Retrieving the Change Texts per Line Item (Purchase Order) - Very urgent

    Hi,
    How do you retrieve the Change Texts per Line Item (Purchase Order).
    Table T166T does not list these values per line item.
    Please help. This is very urgent & important.
    Best Regards,
    John

    if you are lookin out for change of item texts ...
    then use the function module ... READ_TEXT.
    and 2 tables r used ... STXH and TLINE ....
    double click on item data ...
    goto PO TEXT tab ....
    double click on text ...
    from menu ...
    goto header ... u'll get 4 fields that u need to consider ...
    TDID
    TDOBJECT
    TDHEAD
    TDNAME
    ALL THESE U'LL FIND IN  STXH
    ITEM TEXT is stored in TLINE
    Edited by: anjali rana on Mar 5, 2008 4:55 AM

  • Acrobat XI Pro Mac: Changing Text Color moves Text within Paragraph

    Dear Acrobat Experts!
    I've been using Acrobat Pro for over a decade now (Win and Mac) - but Acrobat XI Pro Mac shows some behavior I cannot deal with:
    When I'm changing text color of say a couple of words within a paragraph, usually the formatting changes and text is being moved/shifted. It looks like the text with altered color requires more space and consequently the following words are shifted which very often ruins the whole formatting. This makes Acrobat XI for me nearly unusable, I had never a behavior like this in former Acrobat versions (Win or Mac).
    I cannot believe that this is "normal" - so what's the mistake I'm making? For illustration please see the two screenshots I included.
    I'm looking forward to your helpful comments!
    Oliver

    Hi Sukrit!
    Thanks for your assistance.
    This is the first and only Acrobat version ever I had this problem with. I am running Acrobat Version 11.0.10 under Mac OS X 10.10.3 Yosemite on a MacBook Pro 15" Retina display. I am working on Mac only since Acrobat Pro 7 - the versions before were Windows.
    So I cannot comment on Acrobat XI Pro Win.
    This is happening with all of my PDF docs - regardless of origin (textbook, scientific journal, or PDFs I generated by myself as export from office applications etc.).
    The only difference is the amount of changes to the formatting (shifting of text).
    To illustrate my workflow I generated a screencast and uploaded it here:
    <Dropbox - Acrobat_XI_Pro_Mac_3.mp4>
    Looking forward to hear from you again!
    Oliver

  • Change Text Color Dynamically Depending on Which MP3 File is Playing

    Change Text Color Dynamically Depending on Which MP3 File is
    Playing
    Hi,
    Can anyone help with this problem.
    I am trying to change a text cast member's color dynamically
    based on which audio file is currently playing.
    I have 4 Text Cast member buttons named
    Play Song 1
    Play Song 2
    Play Song 3
    Play Song 4
    I am successfully playing the 4 songs in a queue like this
    (ie. If "Play Song 1" sprite text member is pressed then...
    sound(1).queue(member "Song1")
    sound(1).queue(member "Song2")
    sound(1).queue(member "Song3")
    sound(1).queue(member "Song4")
    sound(1).play
    What I would like to do is to have the currently playing song
    text color changed to a different value, say Green.
    So if "Song2" in the queue starts to play then the text "Play
    Song 2" would become Green. When done it would then turn back to
    black then "Song3" starts to play and "Play Song 3" text script
    button would then turn from black to Green an so on.
    These are the codes I've tried in the frame script and none
    seem to work...
    on enterFrame me
    if sound(1).status = 3 then member("Play Song 1").foreColor=5
    (This works but only for the first song because "Play Song 1"
    is directly named and clicked on.)
    else member("Play Song 1").foreColor=255
    end if
    I have tried to make a reference to the playing song and so
    far each of these doesn't work...
    --if sound(1).status = 3 then
    sprite(me.sound.member).foreColor=5
    --if sound(1).status = 3 then
    sprite(me.spriteNum).member.color=rgb(0,255,0)
    --if sound(1).status = 3 then member
    (sound(1).member).foreColor=5
    --text = member(whichMember).scriptText
    end
    Is there any way to reference the song name text cast
    member??
    I thought I had it when I discovered sound(1).member but
    sound(1).showProps returns the playing sound.member as
    member: (member 28 of castLib 1) nothing there I can use?
    It doesn't show the member name and
    It doesn't show the song name "Song1" which I could then
    match up to the "Play Song 1" text
    I'm pretty new to lingo so specific code examples would be
    appreciated.
    Can anyone help??? Thanks!!!

    did you get anywhere with this?
    When applying a styleClass to a af:showDetailItem, it doesnt seem to have any effect whatsoever.

  • Changing text color of a string

    im looking to change the color of some text within a datagrid. After searching I have found tons on item renderers and cannot figure out exactly how to make it work with what I need.
    I have a datagrid with a label function that looks something like this.
    label function(item:object, column:datagrid):string
         return ( "name:" +item.name+ "age:" + item.age);
    i want to be able to make it look like this when it returns the string
    Name: hello AGE: 45
    with name and age also being a different color than the text brought in from the item
    any ideas?

    You'll need to make an itemRenderer to do this. There many ways of approaching this, but I through together a quick example that applies the formatting using html tags in the htmlText property of an in-line itemRenderer. There are better ways of doing this, though. This example is difficult to read. Using a separate, external component you could override the set data function and go nuts with it. Search the help docs for examples.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="absolute">
        <mx:Script>
            <![CDATA[
                import mx.collections.ArrayCollection;
                [Bindable]
                private var acData:ArrayCollection = new ArrayCollection([
                    {name: 'Charley', age: 45},
                    {name: 'Ben', age: 32}
            ]]>
        </mx:Script>
        <mx:DataGrid
            dataProvider="{acData}"
            width="212"
            y="67"
            x="108">
            <mx:columns>
                <mx:DataGridColumn headerText="Name/Age">
                    <mx:itemRenderer>
                        <mx:Component>
                            <mx:Text>
                                <mx:htmlText>
                                        &lt;b&gt;&lt;font color="#0000FF" size="14"&gt;Name: &lt;/font&gt;&lt;/b&gt;{data.name} &lt;b&gt;&lt;font color="#FF0000" size="12"&gt;Age: &lt;/font&gt;&lt;/b&gt;{data.age}                               
                                </mx:htmlText>
                            </mx:Text>
                        </mx:Component>
                    </mx:itemRenderer>
                </mx:DataGridColumn>
            </mx:columns>
        </mx:DataGrid>
    </mx:Application>

  • Problem with checkbox item renderer in datagrid

    I have a data grid having check box as an item renderer. I have viewed many posts in this forum but nothing useful in my case. I am failed to bind my datagrid itemrenderer checkbox with the field of dataprovider i.e. listUnitMovement.CHECK_PATH. Then I have to traverse data provider to check which checkboxes are checked.
    [Bindable]
    var listUnitMovement:XMLList=null;                      
    In a function call
    public function init(event:ResultEvent):void
        listUnitMovement=event.result.unitmovement;
         <mx:DataGrid id="dg_country"
                               dataProvider="{listUnitMovement}"
                                  enabled="true">
                                <mx:columns>
                                   <mx:DataGridColumn>
                                        <mx:itemRenderer>
                                            <mx:Component>
                                                <mx:CheckBox selectedField="CHECK_PATH"  />
                                            </mx:Component>                                       
                                        </mx:itemRenderer>
                                    </mx:DataGridColumn>
                                    <mx:DataGridColumn headerText="Latitude" dataField="NEW_LAT" visible="false"/>
                                    <mx:DataGridColumn headerText="Longitude" dataField="NEW_LONG" visible="false"/>
                                   <mx:DataGridColumn>
                                        <mx:itemRenderer>
                                            <mx:Component>
                                                <mx:Button label="Details"/>
                                            </mx:Component>                                       
                                        </mx:itemRenderer>
                                    </mx:DataGridColumn>
                                </mx:columns>
                            </mx:DataGrid>

    Hi,
    Do you want to just check/uncheck the checkboxes based on the CHECK_PATH field.
    Do you want something like this...
    <?xml version="1.0" encoding="utf-8"?><mx:Application  xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
     <mx:Script>
    <![CDATA[
     import mx.collections.ArrayCollection;[
    Bindable] 
    private var listUnitMovement:ArrayCollection = new ArrayCollection([{CHECK_PATH:true,NEW_LAT:109.233,NEW_LONG:232.22},{CHECK_PATH:true,NEW_LAT:109.233,NEW_LONG:232.22},{CHECK_PATH:false,NEW_LAT:133.233,NEW_LONG:702.22}]);]]>
    </mx:Script>
     <mx:DataGrid dataProvider="{listUnitMovement}">
     <mx:columns>
     <mx:DataGridColumn>
     <mx:itemRenderer>
     <mx:Component>
     <mx:CheckBox selectedField="CHECK_PATH" change="data.CHECK_PATH=selected" />
     </mx:Component>  
    </mx:itemRenderer>
     </mx:DataGridColumn>
     <mx:DataGridColumn dataField="NEW_LAT"/>
     <mx:DataGridColumn dataField="NEW_LONG"/>
     </mx:columns>
     </mx:DataGrid>
    </mx:Application>
    Please let me know clearly what's your problem...Do you want to just bind the check box based on XmlList or something else..?
    Thanks,
    Bhasker Chari.S

  • Item renderer on DataGrid (not DataGridColumn)

    It seems that all the published examples of using an item renderer on a DataGrid use the itemRenderer property of DataGridColumn.
    I don't think I can do this because my columns are created at run time, depending on the contents of the data provider.
    I have therefore tried to assign my item renderer (a subclass of Canvas) directly to the DataGrid.
    1. This works in MXML when the renderer is inline.
    2. It sees to work when the renderer is an Actionscript class assigned to the DataGrid's itemRenderer property.
    3. It does NOT work when the renderer is Flex component assigned to the DataGrid's itemRenderer property. This compiler error is reported: Initializer for 'itemRenderer': cannot parse value of type mx.core.IFactory from text 'comp:CellRenderer'.
    I prefer to use the last method. Is there a way to fix this error?
    If not, is it possible to attach the item renderer to each DataGridColumn as it is created? DataGrid does not seem to have a suitable event that reports when a column is created.
    Aplogies if this is elementary stuff. I am a real Flex newbie. I am using Flex Builder 3.0
    Andy Kirkham

    A code example would be helpful here, but from your error message it
    looks like you may be doing the following
    <mx:DataGrid itemRenderer="comp:CellRenderer"/>
    Instead of  this, you need to use the fully qualified class name of
    CellRenderer, eg.
    com.renderers.CellRenderer
    Look at the definition of 'comp' towards the top of your MXML file, it
    will be something like:
    xmlns:comp="blah.blah.blah.*"
    Your itemRenderer property should then be set to:
    blah.blah.blah.CellRenderer

  • Changing values in custom item renderer

    I have an xml feed that I am using to populate a List control. The list control has it's itemRenderer property set to CustomListItem which a custom component built by me to display various pieces of data from the xml along with an icon. At certain points I would like to ba able to tell one of the fields in CustomListItem to change from displaying xml.firstData to xml.secondData depending on a radio button selection but I can't find a way to access the properties of CustomListItem from main.mxml (which is where the radio buttons are).
    At the moment the values in CustomListItem are set using functions within it to parse the 'data' property.
    Sorry if this is a bit of a sketchy explanation of my problem Any suggestions would be great.
    Cheers

    I hope this code represents your situation, but at least I hope it helps you!
    ----------------------- main app ----------------------------
    <?xml version="1.0"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%"
      height="100%" creationComplete="dataRequest.send();"
      xmlns:comp="*" horizontalAlign="left">
      <mx:Script>
        <![CDATA[
          import mx.rpc.events.ResultEvent;
          import MyListItems;
          import mx.collections.XMLListCollection;
          [Bindable] private var xmllist:XMLList;
          [Bindable] private var xlc:XMLListCollection;
          private function resultHandler(evt:ResultEvent):void{
            xmllist = evt.result.item;
            xlc = new XMLListCollection(xmllist.firstData);
          private function changeData(evt:Event):void{
            if(evt.currentTarget.label == "First Data"){
              xlc = new XMLListCollection(xmllist..firstData);         
            }else{
              xlc = new XMLListCollection(xmllist.secondData);         
        ]]>
      </mx:Script>
      <mx:HTTPService id="dataRequest" useProxy="false" url="data.xml"
        resultFormat="e4x" result="resultHandler(event)"/>
      <mx:RadioButtonGroup id="items"/>
      <mx:RadioButton group="{items}" label="First Data" change="changeData(event)"
        selected="true"/>
      <mx:RadioButton group="{items}" label="Second Data" change="changeData(event)"/>
      <mx:List width="100" height="150" itemRenderer="MyListItems"
        dataProvider="{xlc}"/>
    </mx:Application>
    ----------------------- item renderer --------------------------
    <?xml version="1.0" encoding="utf-8"?>
    <mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml">
      <mx:Text text="{data}"/>
    </mx:HBox>
    ------------------------------- data.xml ---------------------------
    <?xml version="1.0" encoding="utf-8"?>
    <mydata>
      <item>
        <firstData>apples</firstData>
        <secondData>oranges</secondData>
      </item>
      <item>
        <firstData>beef</firstData>
        <secondData>chicken</secondData>
      </item>
      <item>
        <firstData>milk</firstData>
        <secondData>juice</secondData>
      </item>
      <item>
        <firstData>carrot</firstData>
        <secondData>tomato</secondData>
      </item>
    </mydata>

  • Inbuilt Item Rendering inside DataGrid .

    Hi ,
    Please find the screen shot attached with this Thread .
    The data is been populated into the Datagrid from DataBase using ArrayCollection as DataProvider .
    Now i want to have Radio Buttons displayed at the begning of the each row of Names Column .
    When i tried to use , inbuilt itemRenderer as mx.controls.RadioButton ,  inside DataGridColumn  of 'Names' Column of DataGrid   , the Data appeared in such a way that all the Data inside the Names Column is repalced by showing only RadioButtons .
    Please tell me if this is possible using Inbuilt Item Rendering itself??(As Custom Rendering seems tough for me rigjt now )
    Or suggest me an easy approach , basically my requirement  is that i want to get the Selected Value Object into a function for doing Upadate and Delete facility .
    Please help
    Thanks in advance .

    Thanks for the reply , sorry for th
    late reply as i dont have Flex at my Work place .
    This is my code :
                <mx:DataGrid  id="MyDG" height="100%" width="100%"
                     dataProvider="{flightList}" change="GetTheValue()">
                <mx:columns>
                    <mx:DataGridColumn headerText="Names" dataField="uname">
            <mx:itemRenderer>
    mx.controls.RadioButton
    </mx:itemRenderer>
                    </mx:DataGridColumn>
    <mx:DataGridColumn headerText="Pwds" dataField="pass" >
                    </mx:DataGridColumn>
                </mx:columns>
                            </mx:DataGrid>
    This is the screen shot earlier and now afeter adding Item Rendering , Any help .
    Please find the screen shots attached

  • Unable to change text color (from Black)

    For the next person who blunders into this and searches for an answer...
    If you have a Condition Code whose decoration is a custom color, and you delete the color, the text goes to Black, and you cannot change the color of text bearing that CC - with local color override, or a Character Format that applies a color (I didn't try Paragraph format).
    I am copying formatted content in from an older document that doesn't conform to current templates. I had deleted unused colors in the source, but not unused Condition Codes, one of which rode in with some text. What was controlled by the CC in the old doc is now controlled by a color Character format, except that when applied, the text stayed stubornly black (until I nuked the CC).

    Dear FrameMaker 7.1/Unix user,
    This does not surprise me. As long as the condition is applied and "Show Condition Formats" is active FrameMaker will show the Condition Color (now: Black) and not any underlying text colors.
    - Michael

  • How to change text color in CS4

    Hey everyone. I know I'm not fluent in Dreamweaver, but had DW8 before upgrading to CS4 and I'm pretty handy with it. In version 8, if I wanted to change a text color, I simply highlighted the text and picked a color. No worries.
    However in CS4, I seem to be only have that ability in my CSS properties, (not HTML properties). Then when I try to change the color, it gives me a dialogue box asking questions such as "new CSS", "for this page only", etc. and I don't understand what I'm supposed to do.
    Can someone tell me in a user-friendly way (step-by-step), how to simply change a text color on a page? I went to the help topics and it said to use the 'color-picker', but that takes me back to my original problem.
    I'm either doing something terribly wrong, or ADOBE has made a simple task into brain surgery!
    Thanks in advance for assistance!
    Mark

    Beginning with CS3, DW became more compliant with W3C web standards which call for content (HTML) being separate from style (CSS).  Thus you now have two properties boxes: one for HTML content and another for CSS styles.
    Create a few CSS classes using the CSS style panel.
    CSS:
    .red {color: red}
    .blue {color: blue}
    .green {color: green}
    Highlight a word or sentence on your page and apply the appropriate class to your HTML.
    HTML:
    <p class="red"> this is red text</p>
    <p class="blue"> this is blue text with <span class="green">GREEN WORDS</span> in the middle</p>
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    http://alt-web.com/
    http://twitter.com/altweb
    http://alt-web.blogspot.com

  • IPhoto quits when I try and change text color in book

    When editing a new iPhoto book (version 5), I was changing the font color. As I clicked on the text color icon in the fonts window (show fonts from the iPhoto menu), Iphoto just quit. It also lost all my formating thst I had for my pics. I tried the font color change in other applications using 'Font Book' and the same icon works without crashing the application.
    This is a new thing, because I have had no trouble with the first book I made.
    Thanks
    Powerbook G4 Hi Res 1.67GHz   Mac OS X (10.4.5)   1G Ram, 120 G Hard drive

    Just wondering, when you pull up the inspector, is the writing that is coming up blue a hyperlink (when you click on it, will it take you to a web page or an e-mail)?

  • How can i Change Text Color in table

    How can i change the text color i table, the true becoming GREEN, and the text in Fals becoming RED.
    Someone can help me to resolve this problem with a sample, because when i run the program all text becoming green in (TRUE) and than when i chang it to the (fals) all becoming Red.
    Attachments:
    Color.vi ‏38 KB

    Modifying the properties of a control in a subVI do not modify the properties of a different control in the main VI. The data is the only thing passed back from the subVI. To modify the properties of the table in the main, you need to pass a reference to it to the subVI and modify it's properties. I've attached a modified llb that does what you want.
    Attachments:
    Main_color_Table_mod.llb ‏41 KB

Maybe you are looking for

  • Reply not quoting text of original message

    For the past couple weeks, I have had an increasing number of messages where when I hit reply, the text of the message is not included. Same with forward. These messages always include attachments. All that gets included in the reply or forward is th

  • Advantages of using activities over outlook

    Hello, All Can any one explain me the advantages of using activities over outlook? In Outlook you can schedule the activities for the whole day, see if the period of an activity clashes with another activity so you can reschedule it etc. In short, ca

  • Can I convert a from from Adobe Forms Central to a PDF Form?

    Can I convert a from from Adobe Forms Central to a PDF Form?

  • Discussion and Name not showing up in itunes

    Hey everyone I've just released a new podcast to itunes through libsyn. When I go to itunes the podcast says it's by 'unknown' and the overall show description isn't on there. Here's the link: Can anyone let me know how to fix this. Bev

  • Exchange 2013 DNS for internal and external domain

    Hi All, I have been assigned a task to implement Microsoft Exchange Server 2013. I need some help in setting up DNS namespaces and design a strategy to have same internal and external names. Let me share some details here. We have an Active Directory