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 9163145
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T14:22:32+00:00 2026-06-17T14:22:32+00:00

I have a list control, and an item renderer. Within the item renderer, I

  • 0

I have a list control, and an item renderer. Within the item renderer, I have a text box for the quantity that the person wants of each item. On each qty update (focus in an focus out events on the text box), I am updating the values for the data. In the main program I show totals based on this.

The totalling code works correctly, however when I scroll the list the values show up all over the page. Attached is a screenshot of the values all jumbled up after a simple scroll down. Also, below is the complete item renderer. I have found alot of notes on the web about this but everything I try doesn’t help!

Here is a link to the picture of the problem: Scrolling Error

<?xml version="1.0" encoding="utf-8"?>
<s:ItemRenderer name="PlowResultsRenderer"
    xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:s="library://ns.adobe.com/flex/spark"
    xmlns:mx="library://ns.adobe.com/flex/mx" >


<fx:Script>
  <![CDATA[
   import spark.events.TextOperationEvent;
   import flash.events.EventDispatcher;
   import valueObjects.Tag;
   import valueObjects.TagProjectItem;
   import classes.QtyChangeEvent; 

   [Bindable]
   public var lineQty:Number;
   [Bindable]
   public var lineList:Number;
   [Bindable]
   public var lineDealerCost:Number;

   public var textPlaceholder:String = "0";


   override public function set data( value:Object ) : void {
    super.data = value;

    var thisItem:TagProjectItem = data as TagProjectItem;

    if (thisItem.IsOnHand || thisItem.IsOnOrder)
    {
     currentState = "green";
    }else if (thisItem.IsOnDealerFloorplan)
    {
     currentState = "white";
    }else
    {
     currentState = "red";
    }
    //  #EEA2AD  old red

    lineList = Number(thisItem.ListPrice);
    lineDealerCost = Number(thisItem.DealerCost);
    lineQty = 0;



    validateNow();
   }


   /*protected function dataChangeHandler(evt:Event):void {

    var  thisItem:TagProjectItem = data as TagProjectItem;

    if (thisItem.IsOnHand || thisItem.IsOnOrder)
    {
     currentState = "green";
    }else if (thisItem.IsOnDealerFloorplan)
    {
     currentState = "white";
    }else
    {
     currentState = "red";
    }
    //  #EEA2AD  old red

    lblModelNumber.text = thisItem.ModelNumber;

    //lblListPrice.text = America.format(thisItem.ListPrice);
    lblListPrice.text = America.format(thisItem.PromoPrice);

    lblSWDescription.text = thisItem.SWDescription;
    lblSWCategory.text = thisItem.SWCategory;

    lineList = Number(thisItem.ListPrice);
    lineDealerCost = Number(thisItem.DealerCost);
    lineQty = 0;

    validateNow();
   }*/




   protected function doFocusIn(event:FocusEvent):void
   {

    textPlaceholder = txtQty.text;
    if (textPlaceholder == "0"){
     txtQty.text = "1";
    }
   }

   protected function doFocusOut(event:FocusEvent):void
   {

    if (txtQty.text != textPlaceholder){
     //here the text has been changed.
     var changeEvent:QtyChangeEvent = new QtyChangeEvent(QtyChangeEvent.CHANGE, Number(txtQty.text) - Number(textPlaceholder), lineDealerCost, lineList);
     parent.dispatchEvent(changeEvent);
    }
    textPlaceholder = "0";
    if (txtQty.text == ""){
     txtQty.text = "0";
    }
   }

  ]]>
</fx:Script>
<fx:Declarations>
  <!-- Place non-visual elements (e.g., services, value objects) here -->
  <mx:CurrencyFormatter id="America" precision="2" 
         rounding="none"
         decimalSeparatorTo="."
         thousandsSeparatorTo=","
         useThousandsSeparator="true"
         useNegativeSign="true"
         currencySymbol=""
         alignSymbol="left"/>
</fx:Declarations>
<s:states>
  <s:State name="green" />
  <s:State name="white" />
  <s:State name="red" />
</s:states>
<s:layout>
  <s:HorizontalLayout gap="0"
       paddingTop="1" paddingBottom="1"
       verticalAlign="middle" />
</s:layout>
<s:Panel skinClass="PanelNoTitleBar" horizontalCenter="0" width="100%">
  <s:Rect id="rect" width="100%">
   <s:fill>
    <s:SolidColor color.green="#C1FFC1" color.red="#FFC1C1" color.white="#FFEC8B">
    </s:SolidColor>
   </s:fill>
  </s:Rect>
  <s:HGroup width="100%">
   <s:VGroup>
    <s:Label text="Qty" paddingLeft="2" paddingRight="8" paddingTop="4" paddingBottom="1" >
    </s:Label>
    <s:TextInput id="txtQty" width="34" height="30"
        fontSize="11" maxChars="3" restrict="0-9" softKeyboardType="number"
        widthInChars="3" text="{lineQty}"
        focusIn="doFocusIn(event)" focusOut="doFocusOut(event)">
    </s:TextInput>
   </s:VGroup>
   <s:VGroup width="100%">
    <s:HGroup width="100%">
     <s:Label id="lblModelNumber" text="{data.ModelNumber}" paddingLeft="2" paddingRight="2" paddingTop="4" paddingBottom="1"  />
     <s:Spacer width="100%">
     </s:Spacer>
     <s:Label text="List Price: " paddingLeft="2" paddingRight="8" paddingTop="4" paddingBottom="1" />
     <s:Label id="lblListPrice" text="{America.format(data.PromoPrice)}" textAlign="right" fontWeight="bold" paddingLeft="2" paddingRight="8" paddingTop="4" paddingBottom="1"   />
    </s:HGroup>
    <s:Label id="lblSWCategory" text="{data.SWCategory}" paddingLeft="11" paddingRight="2" paddingTop="1" paddingBottom="1" />
    <s:Label id="lblSWDescription" text="{data.SWDescription}" paddingLeft="11" paddingRight="2" paddingTop="1" paddingBottom="4"  textAlign="right" /> 
   </s:VGroup>
  </s:HGroup>
</s:Panel>


</s:ItemRenderer>
  • 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-06-17T14:22:33+00:00Added an answer on June 17, 2026 at 2:22 pm

    Is this an iOS application? If so, there is a bug with the scrolling of native text controls. The following should fix it:

        <fx:Style>
            @namespace s "library://ns.adobe.com/flex/spark";
            @namespace mx "library://ns.adobe.com/flex/mx";
            @namespace local "*";
            s|TextInput {
                skinClass: ClassReference("spark.skins.mobile.TextInputSkin");
            }
            s|TextArea {
                skinClass: ClassReference("spark.skins.mobile.TextAreaSkin");
            }
        </fx:Style>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a list box control that contains enough items to list them with
In my application, I have a List that uses an item renderer. The renderer
I have a HorizontalList control that uses a custom ItemRenderer to represent each item
I have many items inside a list control. I want each item to have
I have the list box control (ASP.NET Control On aspx page, language C# ).
I have created a repeat control that list some documents. I would like to
I have list box control where I am binding the values to the listbox
I have a ASP.NET bulleted list control that, until today, was created and used
I have a list box control in my form which contains the paths of
I want to create a Tab Control that only opens content once. Each item

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.