Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 257765
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T22:07:28+00:00 2026-05-11T22:07:28+00:00

I have a custom item renderer which displays a different gif in the row

  • 0

I have a custom item renderer which displays a different gif in the row depending on data value from the data object. When i set the image source url using the absolute path and not embedding it works fine however when i embed the images i find that when i scroll up and down the grid the images get messed up and sometimes sit on top of each other.

Does anyone have any ideas on why embedding images in my hbox item renderer is causing so hassle;

code

public var equipment:Image;
public var compr_icons:Bitmap = new AssetManager.COMPUTER_ICON;

.. do some logic
equipment.addChild(compr_icons);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T22:07:29+00:00Added an answer on May 11, 2026 at 10:07 pm

    In your item renderer, try overriding the data setter (which gets called implicitly by the SDK for each item in your dataProvider as you navigate through whichever data-bound control you happen to be using), and setting the image’s source property from there, like so:

    <mx:List dataProvider="{yourDataSource}">
        <mx:itemRenderer>
            <mx:Component>
                <mx:HBox>
    
                    <mx:Script>
                        <![CDATA[
    
                            override public function set data(value:Object):void
                            {
                                super.data = value;
    
                                // Set your values here (value contains your data item)
                                myImage.source = value.yourImageSourceInstance;
                                myLabel.text = value.yourLabelText;
                            }
    
                        ]]>
                    </mx:Script>
    
                    <mx:Image id="myImage" />
                    <mx:Label id="myLabel" />
    
                </mx:HBox>
            </mx:Component>
        </mx:itemRenderer>
    </mx:List>
    

    … and see if that helps. Flex is probably trying to reuse the visual elements of the renderer, not realizing your intention is to swap them out as your data changes. By taking action then (when the data item gets set), you’re able to control more explicitly what happens with the visual elements of the renderer.

    Hope that helps!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My application has a tree with a custom item renderer, which depending on the
I have a Spark List component with custom Item Renderer. Data provider for the
I have a AdvancedDataGridColumn with custom itemrenderer which displays undefined in the group summary
[Situation] I have a custom item control which I add to a stack panel
I have created a custom item renderer for the tree, i have added some
I have a Datagroup with a custom item renderer the momment I bind it
I have a datagrid w/ a custom item renderer, as follows: <mx:AdvancedDataGridColumn dataField=file> <mx:itemRenderer>
I have a custom component as an item renderer. In this renderer there is
I have a custom ItemRenderer that displays 5 text inputs in each of 3
I have some custom type: [RdfSerializable] public class Item { [RdfProperty(true)] public string Name

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.