itemrenderer

Flex custom item renderer for the displayed item in the combobox

喜你入骨 提交于 2019-12-05 21:03:31
问题 I am using a custom item renderer in a combobox to display a custom drawing instead of the default text label. This works fine for the dropdown list but the displayed item ( when the list is closed) is still the textual representation of my object. Is there a way to have the displayed item rendered the same way as the one in the dropdown? 回答1: By default you cannot do this. However, if you extend ComboBox you can add this functionality easily. Here is a quick example, it is a rough version

Disable roll-over color for List or DataGrid components

耗尽温柔 提交于 2019-12-05 13:29:22
I want to get rid of the typical Flex roll-over color in list-based components, and to display my own style of roll-over rendering. Setting useRollOver to 'false' is not an option , since disabling that will also make the List.isItemHighlighted() function to always return false. My custom renderer relies on that function. Can it be so hard? Is there no way of setting that roll-over color to transparent? Is there some other way for my renderer to figure out if an item is highlighted? Thanks! EDIT: Of course I could set the rollOver color to 'white' and set the alternatingRowColors to something

Flex: Caching images in list item renderer?

天涯浪子 提交于 2019-12-05 04:54:01
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? Thanks! Here is nice solution with source code http://demo.quietlyscheming.com/superImage/app.html You'll have to implement your own caching. I would store all the images that have been previously downloaded and load them if the user goes back to them. I remember doing this

flex 4 list ItemRenderer: how can i have different itemrenderers for different rows?

左心房为你撑大大i 提交于 2019-12-04 19:41:09
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 ? update 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

List with multilined (word wrapping) item renderer - how to scroll to the bottom? With test case and screenshots

谁说我不能喝 提交于 2019-12-02 15:58:03
问题 In a Flex 4 web application I am trying to use a spark.components.List for a chat (for various reasons - it works well for me in a Flex mobile app already), but because I use an item renderer which can be multilined (i.e. wraps too long lines) I have the problem, that I can not scroll the list to its bottom by calling its ensureIndexIsVisible method: I have prepared a very simple test. These are just 2 files, which will work instantly, when you put them into a new Flex project in Flash

List with multilined (word wrapping) item renderer - how to scroll to the bottom? With test case and screenshots

元气小坏坏 提交于 2019-12-02 08:59:30
In a Flex 4 web application I am trying to use a spark.components.List for a chat (for various reasons - it works well for me in a Flex mobile app already), but because I use an item renderer which can be multilined (i.e. wraps too long lines) I have the problem, that I can not scroll the list to its bottom by calling its ensureIndexIsVisible method: I have prepared a very simple test. These are just 2 files, which will work instantly, when you put them into a new Flex project in Flash Builder - MyApp.mxml: <?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com

Multilined itemRenderer for a spark.components.List - with test case and screenshot

假如想象 提交于 2019-12-01 11:36:08
In the simple Flex 4 web application below - is it possible to change the custom item renderer MyRenderer , so that it wraps the too long lines? TestApp.mxml: <?xml version="1.0" encoding="utf-8"?> <s:Application 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 mx.collections.ArrayList; private static const MONTHS:ArrayList = new ArrayList([ "1 January is a beautyful month", "2 February is a beautyful month", "3 March is a beautyful month", "4 April is a beautyful month", "5 May is a

How can I know when a Button in a Flex DataGrid itemRenderer is clicked?

馋奶兔 提交于 2019-12-01 08:33:24
I have a DataGrid component that displays a few columns of data. It has one additional column that displays a Button that allows the user to take an action with regard to the record. <mx:DataGrid dataProvider="{myData}"> <mx:columns> <mx:DataGridColumn dataField="firstName" headerText="First Name" width="75" /> <mx:DataGridColumn dataField="LastName" headerText=" Last Name" width="150" /> <mx:DataGridColumn dataField="phone" headerText="Phone" width="120" /> <mx:DataGridColumn headerText="" width="110"> <mx:itemRenderer> <mx:Component> <mx:Box horizontalAlign="center" width="100%"> <mx:Button

Flex - Sending a parameter to a custom ItemRenderer?

点点圈 提交于 2019-11-29 23:03:42
What I am trying to accomplish to to get financial data in my Flex Datagrid to be color-coded--green if it's positive; red if it's negative. This would be fairly straightforward if the column I want colored was part of the dataProvider. Instead, I am calculating it based on two other columns that are part of the dataProvider. That would still be fairly straightforward because I could just calculate it again in the ItemRenderer, but another part of the calculation is based on the value of a textBox. So, what I think I need to be able to do is send the value of the textBox to the custom

ANDROID - ExpandableListView

南楼画角 提交于 2019-11-26 18:52:28
Im trying to figure out how to build a view that contains (many of): PARENT1 (checkable, expandable) CHILD1 (RADIO BUTTON) CHILD2 (RADIO BUTTON) ... PARENT2 (checkable, expandable) CHILD1 (CHECKABLE) CHILD2 (CHECKABLE) ... The point is that parent has to be checkable and based on that children have to change the icon. Can some1 point me into the right direction, because from what i found nothing seems to work for me. I assume, you have your data structured somehow, like: ArrayList where Parent {name:String, checked:boolean, children:ArrayList} and Child {name:String} If so, you only have to do