Actionscript 3 :: Flex4 List ItemRenderer Children And Events
Nov 25, 2010
I have a custom item renderer that im using in a List. There is a CheckBox and a ColorPicker in the item renderer. I have created my own custom event classes for these two items and they are not bubbling their events.You can also click the item in the list, I have 3 listeners attached to the list, I don't want the list item handler firing when children of the list get clicked.[code]
View 1 Replies
Similar Posts:
Jun 27, 2011
I'm creating a swf, that has a parent class and a child class. The parent class has a button, that dispatches a custom event and I want the child class to list for this event, but when I dispatch the event the child class does not hear the event has been dispatched.[code]The register EventListeners() function is in the child class.I know events can bubble up the display list but how can then go down the list?
View 1 Replies
Oct 21, 2010
How to make a custom item renderer in flex 4 without extending the ItemRenderer class?I need this because I want to use a custom class that is extended in all my components. as this item renderer for me is like a component, i would like to extend that custom class.[code]the ThumbView doesn't extend the ItemRenderer
View 1 Replies
Sep 30, 2009
I have an animation that I want to start when clicking on the flash window. However, I've also have some buttons on the stage. If I add an event listener for MouseEvent.CLICK on the stage, then it 'eats up' the events and the buttons don't work.
I've tried some tricks, by adding some invisible buttons on top of the real ones, and use the MOUSE_OVER event to selectively enable/disable the mouseEnabled flag for the stage, but didn't work because it complains that the property or method doesn't exist (which I find odd).
View 3 Replies
Jul 25, 2011
I want to display Accessory View(Right Side Arrow Button) in Flex List View.
View 1 Replies
Jan 24, 2011
I have a spark list control whose data is rendered using an itemrenderer. Basically the Item renderer lays out the data within a Panel.
The Panel has a LinkButton, which when clicked needs to pass an Id to the parent application. In the parent application I have a function that dispatches a custom event to its parent. I want to know how to call this function from the ItemRenderer.
I tried using parentDocument.outerfunction etc but it throws an error..
View 5 Replies
Jun 15, 2010
How to access List itemRenderer and its properties (Spark - Flex 4)?I want to iterate through list and do something like (note it's pseudo code):
for (var i=0;i<NUMBER_OF_ITEMS_IN_LIST; i++){
myList.getItemRenderer[i].property
}
[code].....
View 2 Replies
Aug 3, 2010
I have a Flex list and a custom ItemRenderer. I'd like to be able to have some items in the list use a different ItemRenderer (say, depending on the class of the item). Is this possible?
E.g.: <s:List dataProvider="{_systems}" itemRenderer="myItemRenderer"/>
Most items in _systems use myItemRenderer. But if element 3 of _systems is "specialSystem" the renderer would be "specialItemRenderer".
View 2 Replies
Jun 28, 2010
I'm creating a list of scores for a game. now most of the list i need to have the same ItemRenderer. but in one specific row of the list where the user who's playing is listed, it should show different information and with different background color. how can i achieve this ?
I already tried to resolve the issue with states, i created 2 states, one state called 'mine' and the 2nd state called 'others'.
the problems that i got is that when users click on one of the list rows that state changes to i donno clicked or something and that's why i assumed that states are not the right action for me.
View 3 Replies
Oct 22, 2010
When I change the: list.selectedItem.name = 'name2'
then in my item renderer
the dataChange event is not fired! and I can't update the label with the name property...
View 2 Replies
Feb 11, 2011
I'm attempting to change the contentBackgroundColor of a List component depending on the content found within the dataprovider.[code]...
View 2 Replies
Jun 22, 2011
I have a List with textInput as itemrenderer. Initially the list is loaded with data from a data provider. However since the items are rendered in textInputs, I have the ability to change the value of a particular item.
But when trying to access the value of the changed item using the function below, I still get the old value in my trace:
private function addItem(event:Event):void {
trace(myDataProvider.getItemAt(myList.selectedIndex).label);
}
what I need to do for the new value to be available. My itemrenderer is shown below:
<?xml version="1.0" encoding="utf-8"?>
<s:ItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
[Code].....
View 1 Replies
Jul 31, 2011
i am using an itemRenderer in mx:list, it has many text fields and combos, i use this item renderer to edit items in array collection, each item in the arrayCollection is of type Action which comes from BlazeDS remoting as a valueObject.my problem is when i add new item of type Action to the list dataProvider (ArrayCollection) by this code
myList.dataProvider.addItem(new Action());
the new item tooks the same data from its previous item.
View 1 Replies
Aug 2, 2011
Is there a direct way to get the item index of the data inside an itemRenderer? I need to display the item number against each item. I am currently doing a workaround and won't allow reuse of my itemRenderer component.
var index:int = model.dataColl.getItemIndex(data) + 1;
itemNo = index.toString();
This is what i am using now, it works, but the concepts of component reuse and data abstraction are compromised.
I am using Flex 3.
View 3 Replies
Jul 23, 2009
I'm using a custom itemrenderer to display a list of photos and need to know how to control the width. At the moment it does this: Which, as I'm sure you'll agree, is eye-bleedingly ugly. The list is created like this:
[Code]...
View 3 Replies
Oct 26, 2010
In Flex I can create an ItemRenderer to represent each item in the Lists DataProvider but how do I access the instance of the ItemRenderer via the DataProviders Object? Something like myList.getItemRenderer(dp.getItemAt(10));
View 2 Replies
Nov 10, 2010
I have a list that uses a checkbox itemrenderer. The dataprovider is a collection of people. When I load the data from a file, each list item shows the person's name (last, first -- labelFunction), and the checkbox's selected property shows the person's included property. I.e.,Smith, Doug - [x]Williams, Bob - [ ]orris, Anne - [x]However, each person also has an active property. I want to disable the checkbox for people who are inactive (meaning, "you can't include inactive people").to do the same thing in a datagrid. However, none of them work and all the checkboxes are enabled regardless of the person's active status. Here is my basic code:
<mx:List id="peopleIncludedList"
dataProvider="{someProvider}"
labelFunction="peopleLabelFunction">
[code]....
View 2 Replies
Apr 25, 2011
I need to create a slideshow using data received from another view.I'm calling the slideshow's view like this:
<s:List id = "list" dataProvider = "{actions}"
change = "navigator.pushView (DetailsProduct, list.selectedItem) ">
<s:itemRenderer>
[code].....
View 1 Replies
Mar 1, 2012
I have the list shown below:
<s:List id="list2" width="100%" height="100%" dataProvider="{ recordingsShown }"
itemRenderer="components.VideoItemRenderer2"
selectedIndex="0" visible="false">
[Code].....
View 1 Replies
Oct 29, 2010
I've wrote a custom itemrenderer for a List component (Flex 3.5) which is a VBox with a Label and a TextArea wrapped inside. All works fine so far but I want the TextArea in the first itemrenderer to receive focus so that it instantly becomes editable when tabbing onto the List. Is that possible and if how would I achieve this?
I've already added an event listener that selects the item at index 0 but the textArea in it should also be focussed at that moment _list.addEventListener(FocusEvent.FOCUS_IN, onListFocusIn);
private function onListFocusIn(e:FocusEvent):void
{
_list.selectedIndex = 0;
}
View 1 Replies
Dec 29, 2010
I am using a spark list control with an itemrenderer. Whenever I set an itemrenderer's currentState, the moment I mouse out of the itemrenderer, it gets reset to its default state. How can I make an itemrenderer keep its currentState unless I explicitly tell it to change?
View 1 Replies
Feb 9, 2011
I am having an issue with my ItemRenderer, which I am using for a spark List. My code is the following:
I have this list:
<s:List
id="productSetList"
dataProvider="{ model.productSets }"
[Code]....
The thing is, if I scroll the list, and click on an item, it does not trace 'arthur' ! Why is this so ? I must trace that all the time that someone clicks in the list!
EDIT: If I remove change="model.selectSet( productSetList )" in the list, it works!! but I cannot remove that, some suggestions ? How can I switch that to another function?
View 2 Replies
May 3, 2011
I am trying to create a generic List, where I can pass the layout & item renderer as parameters.Since it is not possible to pass parameters to a MXML component's Constructor, I figured I should create my List in Actionscript.
[Code]...
I would prefer to have the List in MXML (because It will be easier using states later), but If I am forced to use pure Actionscript so I can instantiate it and pass in parameters, any help would go a long way.
View 1 Replies
May 4, 2011
Objective:I would like to pass Skins to an itemRenderer (which is a Button) of a List, and be able to skin every button in that List.This is what I have:
List:
<s:List itemRenderer="renderers.ItemRenderer" dataProvider="{collectionWorkspace}" />
ArrayCollection:
<s:ArrayCollection id="collectionWorkspace">
<comp:Layout1 />[code]...
I get an error (fixed for clarification):Error: Skin for Application....Button1 cannot be found.
View 1 Replies
Jun 22, 2011
I want to set the BorderColor of certain Item Renderers (textInput) of a List. By default all have a common border color, but I want for example when clicking in an item to have a red border. I tried this on a click event in my itemRenderer,
[Code]...
View 1 Replies
Sep 22, 2011
I have a list inside a VDividedBox. When the box is resized so the vertical scrollbar shows on the list, it covers some of the itemrenderers. How do I get the list to resize horizontally so that the scrollbar does not cover the renderers?
View 1 Replies
May 10, 2011
I am trying to duplicate a sprite that I loaded a bunch of images in from an xml.
I even tried senocular's way of duplicating display objects and it just returned an empty sprite.
View 2 Replies
Apr 2, 2010
In my game there is a podium which at some point can have people on it which are added as children. There is a mouseover event listener on the podium to bring up a rollover box. I only want this rollover to appear when the mouse is over the podium graphicPodium Sprite:Children )-> graphic:Sprite ( visuals for the podium )-> person:Sprite ( a person on the podium)(children) -> graphic:Sprite ( visuals for person)Now the problem is, the person graphic overlaps and extends beyond the podium one causing the rollover area to popup when the mouse is outside of the podium area if its over the perseon sprite.
View 5 Replies
Jun 29, 2011
In a flex project that I have that is designed to scale 100% to the web window, I have a spark list. And I have a simple itemrenderer that takes the data and displays a name, and a message. Just think of it like a simple instant messenger display. The problem is that for my msg_txt label I want to give it a width thats the width of the parent list thats holding it.I tried turning the horizontalScrollPolicy to off, also tried width="this.parent.parent.width}" (as well as this.parent.width) for the spark label inside the item renderer. and in the label i tried some things like left="0" right="0" maxWidth="{this.width}" but nothing really does the trick.How can I make this label have a max width of the list thats holding it, AND make sure it resizes if the size of the browser changes and the list size changes?heres the list:
<s:List id="chat_content" width="100%" height="100%"
alternatingItemColors="[#EEEEEE,#E6E6E6]" contentBackgroundColor="#EEEEEE"
horizontalScrollPolicy="off" itemRenderer="renderers.ActiveChatItemRenderer">
[code].....
View 2 Replies
Sep 1, 2011
I have a main application that contains a list, using a custom itemRenderer to display data.
I would like to be able to call a function, inside the itemRenderer, from the main application.
When running the app, we have a list with three persons, and a button. I want to call the function myItemRendererFunction() inside the itemRenderer, of the selected item in the list, all this, from the main app.
[Code]...
View 1 Replies