ActionScript 3.0 :: Access Custom Item Renderer?
Jun 6, 2011
create a custom itemrenderer in Flex, whether there is some way to access the components that you place within the itemrenderer using actionscript? For instance, if I create a custom itemrenderer like this one:
<mx:itemRenderer>
<fx:Component>
<s:Group id="ThumbnailContainer" width="75" height="75">
[code]...
Is there a way that I can access the "Group" container for each of the tiles that the program produces? So if I create a TileList, use the item renderer above, and have a dataprovider with 10 elements in it, is there a way that I can access or address the Group container for each of the 10 tiles that are created using actionscript?
View 0 Replies
Similar Posts:
Mar 4, 2011
<mx:itemRenderer>
<mx:Component>
<mx:Canvas>
[code]......
View 2 Replies
Jul 25, 2009
I have made the following item renderer in mxml, but when I use it in a list for some reason I can not select it. Am I doing something wrong?
<mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml"
horizontalScrollPolicy="off">
<mx:Script>
[code]......
View 2 Replies
Jun 17, 2010
I have a Renderer:
<?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 5 Replies
Oct 14, 2010
I have created a custom item renderer for the tree, i have added some children in create children function, my problem is that sometimes i need to show these children and sometimes i don't, depending on clicking on a button which also i have added at create children, the problem is that i had to create the item even if i don't want it to be visible, and removed it by making visible false, and this costs a lot of memory, i have tried to create it at buttons click listener but when scrolling the child disappears, and it may appear again if i keep scrolling up and down.. i am trying to add the child just when i need it to be visible, is this possible or i have to create it on child creation method?
View 1 Replies
Jul 20, 2010
my renderer contains a canvas in it, i add some title-window, every time i see my tree previously added Title-Windows are visible, i want to access each n every item in tree and remove previosly added all windows from the rendere. how access all the item renderer in AS3 ?
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
Feb 23, 2011
we have developed a web application by using flex-blazeDS-Java. Now we got a requirement that to print the user existed page whenever he clicks on Print button. I am able to print my flex componets and advanced datagrid but not able to print the custom item renderer images which are rendered in datagrid. And also how to print the multiple pages when I have large data in advanced datagrid.
View 1 Replies
Jun 1, 2010
I have an Item Renderer having HBox. Now I want to add child in that HBox from my application file using addChild method. Any way around for the same. I am not able to access the properties of HBox inside the item renderer.
View 1 Replies
Mar 28, 2011
I'm trying to create a list with icons. There're a lot of examples but seems all of them are using embedded images.My problem is how can I create the list with icon from base64 png string at runtime?
View 1 Replies
Mar 6, 2012
I have a datagrid and I need the user to enter data in one of the columns. I have gotten that far, but I havnt been able to get the data the user types in. I need the input from the user. How do I retrieve it
percentColumn = new DataGridColumn();
percentColumn = dg.getColumnAt(3);
percentColumn.cellRenderer = LoaderCellRenderer;
[code]......
View 1 Replies
Dec 7, 2011
ow do you display HTML formatted text in a Spark custom item renderer (Actionscript)?
Sample Code:
The html content in item.post_content displays as plain text in the IconItemRenderer messageFunction snippet below (which is just the default generated code for Icon Item renderer):
<s:itemRenderer>
<fx:Component>
<s:IconItemRenderer iconField="iconField"
iconWidth="64" iconHeight="64" labelField="post_title" messageFunction="getPost">
[code]...
View 1 Replies
Jun 10, 2011
I'm creating a mobile app in which I need to show a calendar with months at the top. The months are part of a component that extends from SkinnableDataContainer (and has some custom scrolling/behaviour - which is why I did'nt use a spark list). I need the months to be shown as a 'trapezium' shaped tab and so I'm using a png image as a mask in the item renderer for the component.
When the mask is not applied, it all works well - the months render, the list/data container selection works when I click on a month and so on.When the mask is applied, it renders well, scrolling and everything else seems to work well - but when I click on a month, nothing happens visually. And from the trace statements in my code, it appears list item selection is not changing. Looks like mouse clicks are not working.
Code:
public class TopCalendarMonthRenderer extends LabelItemRenderer {
[Embed(source="/assets/trapezium_alpha.png")]
private static var TrapeziumMask:Class;
private static var trapeziumMaskInstance:BitmapAsset;
[code]...
View 1 Replies
Mar 10, 2011
How to show the item index in my item renderer.Owner of the item renderer is TileList. [url],..
View 2 Replies
Aug 13, 2009
I am trying to center itemRenderers in a horizontal list if the number of items in the list is less than the maximum visible number.
View 4 Replies
Sep 8, 2010
I have a Datagroup with a custom item renderer the momment I bind it to XML from an http service it stops working.
[Code]...
View 2 Replies
Nov 24, 2009
I'd like to have an overlay that draws lines between selected items in different Flex 4 List controls.
The problem is I can't figure out how to access the x, y coordinates of the list's item renderers.
View 2 Replies
Nov 29, 2010
How do I wordwrap in a spark list w/ an itemrenderer? This posting at[URL] works 100% but when I try to set a separate item renderer, I can't get the word wrapping...instead, I get an ugly horizontal scroll bar. HEre is my mxml:
[Code].....
View 1 Replies
May 9, 2011
I have an mx:tree with with TreeItemRenderer as below.
Parent1 (Delete | Rename)
Child1
Child2
Parent2 (Delete | Rename)
Child3
Child4
Delete and Rename are link buttons
Now when i click Rename a popUp should be shown like
OldName : Parent1(Text Input showning present Name)
Enter New Name: Parent1NewName(Text Input for entering New name)
OK | CANCEL Buttons
Afetr Entering the new name,click OK,popup should be closed and need to get the value in the treeItemRenderer.
I have the logic to rename the Parent1 in TreeItemRenderer and also I m able to get the Parent1 in the popup OldName TextInput.But after entering the new name i m not able to get that new name in the TreeItemRenderer.
View 1 Replies
Jun 16, 2011
I use a spark List with a custom item renderer and an ArrayCollection for dataProvider.
The ItemRenderer looks something like
<mx:TextInput id="txtValue1" text="{data.myFirstValue}"/>
<mx:TextInput id="txtValue2" text="{data.mySecondValue}"/>
However, even though I change the text in txtValue1 or txtValue2, those are not actually changed in the object inside the ArrayCollection.
myFirstValue and mySecondValue are decorated with the [Bindable] tag.
My understanding is that if the text property is set to be bound a certain property, the changes should be automatically applied.
So the HACK (or so I think) that I use is to listen to the focusOut event of each textbox, and access the parent data provider and set the the values manually.
View 1 Replies
Aug 5, 2011
Is it a bad idea to inject data into an itemrenderer. The reason I ask this is because the state of each item is dependent on different changing data sources. So the original data is used to just display a new item, but there could be two to three other data collections that would be needed to determine the item's behavior. Is there a better way to do this? Should I be creating a custom DataGroup with the other data sources as properties on this custom container and then reference the data sources from the itemrenderer to the parent?
View 1 Replies
Aug 15, 2009
I have a HorizontalList that is resized at runtime. The problem is that the items are not adjusting their height to the height of the HorizontalList. I use an item renderer (vBox) which has its height set to 100%. But the items always stay at their initial size.
View 1 Replies
Sep 1, 2009
Within a DataGrid, I have a DataGridColumn that uses a custom component as the item renderer. Within the component, I have an ArrayCollection that stores a set of value objects. My problem is that I cannot access the ArrayCollection values from outside of the item renderer component. Does anyone know how it would be possible to do this? I have posted a code snippet below.
<mx:Script>
<![CDATA[
// Cannot access arrFiles from here.
[code].....
View 2 Replies
Oct 20, 2009
I have a List and the item renderer displays an image. Whenever you scroll the list, and the item renderer refreshes, it redownloads the image. Causing there to always be a delay. Is there some way of caching it so it doesn't have to redownload every time causing a delay in showing the image every time you scroll the list?
View 3 Replies
Apr 30, 2010
I'm trying to create a Flex DataGrid where the firstname and lastname are shown under each other, but in the DataGridColumn
Ideally I would want to do something like
<mx:columns>
<mx:DataGridColumn headerText="Column 2" dataField="time"/>
<mx:DataGridColumn headerText="Column 2" dataField="firstname,lastname" itemRenderer="renderers.FirstNameLastName"/>
so that both values get passed to the itemrenderer, is this possible?
View 1 Replies
Oct 26, 2010
I have a Flex Spark List (well it's a Tree to be precise but it renders as a list) and as I'm scrolling through it I want to provide information about the item that is currently at the top of the list in context to the viewport. So this could be the 100th item in the list depending on how far you've scrolled down.
View 1 Replies
Feb 27, 2011
I have a problem in my datagrid itemeditor This is my data grid component
<mx:DataGrid id="lessonPlanDataGrid" x="10" y="10" dataProvider="{studentLessonPlanArray}" height="271" width="270" editable="true">
[Code]...
View 1 Replies
May 30, 2011
Is there a way to prevent recycling of item rendered with Spark components on Flex 4.5 ? It might sound ridiculous, but actually this would do the trick until i understand a bit more the rendering life-cycle
View 4 Replies
Jun 2, 2011
I have a TileList with a custom item renderer.I need to change the children of the ItemRenderer when the dataprovider changes for the TileList.Currently,override protected function createChildren():void{Works fine with the inital data, but when the data changes to a different structure I need to recreate the children somehow.I image there has to be a way to listen to the TileList for a data change from inside the item renderer, but how? Or is that even the best route to go?
View 1 Replies
Nov 28, 2011
I've been playing around with renderers the last few days for a mobile application. I'm creating a gridlike renderer that has columns that is light weight for a mobile app. It is a bit of a poor man's datagrid. The layout is fine. The question I have is controlling the height of each row in the list.
When measure() is called, I set the measuredHeight to:
measuredHeight = getElementPreferredHeight(ld) + verticalPadding;
Where vertical padding is:
var verticalPadding:Number = getStyle("paddingTop") + getStyle("paddingBottom");
When I debug on the desktop, the measuredHeight is set to 12 and on the device (Motorola Atrix), it is set to 12. But when layoutContents is called, the unscaledHeight is a number much larger than my measuredHeight value (44 on the device, 66 when running on the desktop), resulting in more vertical whitespace surrounding each item than I care to have. How do I control that row height? I happen to be using a Datagroup for this particular example but in some playing around I did with just a simple list, I had the same issue. Somewhere the system is overriding my measuredHeight with some other value.
View 1 Replies