itemrenderer

ItemRenderer height (and height changes) not reflected in AdvancedDataGrid row

寵の児 提交于 2019-12-11 05:18:15
问题 I have an AdvancedDataGrid with variable row height set to true. I have written a cutsom item renderer based on the DataGroup spark component. Each row in the grid has multiple entities to display, the x position and width of the entites are based on the data of the entity itself. I have a custom layout written for the DataGroup that measures and posistions each entity based on its data. Each entity in each row can either truncate or not truncate its label. When the labels are not truncated,

Prevent selection of a particular item in spark list

元气小坏坏 提交于 2019-12-11 01:54:39
问题 I have a Spark List which has a custom itemRenderer for rendering each item in the List. I wish to prevent an item in that list from being selected (based on some custom logic) by the user. What is the best way I can achieve this? Here's how my List is defined: <s:List id="myList" itemRenderer="com.sample.MyItemRenderer" /> and of course, I have a item renderer defined as the class com.sample.MyItemRenderer . 回答1: The selection of items is handled by the list alone as far as I know, so I

Issues with keyboard navigation on list with custom renderer

浪子不回头ぞ 提交于 2019-12-10 19:08:53
问题 We have a list that uses a custom renderer containing a label, a checkbox and two icons (which have click events). This list needs to be made WCAG 2.0 compliant and in order to do that we need the list to be keyboard navigable. The problem is with being able to move from one list item to the next and have the focus move to the label for the next/previous list item. Specifically, when the user enters the list using TAB button, the label for the first list item receives focus (highlighted box

Custom Itemrender in Datagrid with Datatip

大城市里の小女人 提交于 2019-12-09 22:40:16
问题 I have a datagrid with one datagridcolumn in it. Without a custom itemrenderer I can use a datatipfunction for showing a custom datatip but now I want to have a custom item render for colouring the rows differently. Therefore I extended a label and changed the data method but now my datatipfunction does not work anymore. Any ideas? thanks in advance Sebastian 回答1: I know this question is a wee bit old, however I just ran into the same problem and solved it by looking at how the standard

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

点点圈 提交于 2019-12-09 03:21:28
问题 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

Flex: get column index in custom itemrenderer for spark datagrid

倾然丶 夕夏残阳落幕 提交于 2019-12-08 13:03:47
问题 I am trying to use the same custom renderer for all the columns in a spark DataGrid . I need to know the dataField or columnIndex based on which I can change state in my custom itemrenderer. Earlier in mx:DataGrid, this can be achieved by extending the MXDataGridItemRenderer which implements IDropInListItemRenderer and hence dataGridListData property is available. But using the spark DataGrid, I am extending the GridItemRenderer which DOES NOT implement the IDropInListItemRenderer and hence

Display List ItemRenderer Index in Flex3

左心房为你撑大大i 提交于 2019-12-07 23:12:30
问题 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. 回答1: The first answer seems to be working, but slow. It takes O

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

南楼画角 提交于 2019-12-06 14:36:48
问题 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

Display List ItemRenderer Index in Flex3

六眼飞鱼酱① 提交于 2019-12-06 09:55:13
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. The first answer seems to be working, but slow. It takes O(n^2) time as it runs through dataProvider array to get item index each time. We can access rowIndex from

Multiple CJuiAutocomplete in Yii - items not rendering

烂漫一生 提交于 2019-12-06 04:22:42
I need two CJuiAutocomplete items on my view page. Unfortunately - only one of them is rendering items properly. The other one - renders empty rows. I checked in firebug and the values are retrieved from database properly. Actually if I change the order of the registerScript - only the autocomplete from last registerScript renders items properly. Here is my code: <?php $this->widget('zii.widgets.jui.CJuiAutoComplete', array( 'name' => 'autocities', 'sourceUrl'=>$this->createUrl('projects/dynamicGetCities'), 'options' => array( 'minLength' => 2, 'select' => "js: function(event, ui) { $('