Search Results

Search found 90 results on 4 pages for 'itemrenderer'.

Page 2/4 | < Previous Page | 1 2 3 4  | Next Page >

  • Adapting the width of a Flexs 3 DataGridColumn to the content of its ItemRenderer ?

    - by phtrivier
    I have the following scenario : A Flex 3 DataGrid is sitting here At runtime, a column is added to this grid The column has a custom ItemRenderer The ItemRenderer inherits from HBox, and adds a few items to the HBOx dynamically My problem is that the width of the column doesn't change. As a consequence, my column stays small, and an ugly horizontal scrollbar is displayed in the line, instead of my content (which is completely unreadable). I would like the column to adapt its width to the content of the HBox in the ItemRenderer. I tried the following : Setting the 'percentWidth' of the ItemRenderer to '100' Invalidating the properties of the ItemRenderer after adding the items The only thing that has a "visible" effect it to force the width of the DataGridColumn. Obviously this is not acceptable since I'm dynamically adding components to the ItemRenderer, and I don't know how many or how big they are. Besides, when I am in the ItemRenderer, I have no access to the column itself (or do I ?) so I cannot force the size of the column from here. So is there a way around this ? Would AdvancedDataGrid help here (notwhistanding the fact that I cannot really use it for other reasons ...) Thanks PH

    Read the article

  • Disabling itemrenderer Hovered state

    - by duder
    My itemrenderer has 2 custom states, no hovered state, and no normal state <s:states> <s:State name="state1" /> <s:State name="state2" /> </s:states> When I initialize it, I force it to go to state2. The problem is that when it's hovered over, it relapses back to the first state state1. It's kind of weird since I don't really have a hovered state. Anyone knows how to prevent this from happening? maybe by somehow disabling the hover effect?

    Read the article

  • Item Renderer having trouble updating

    - by duder
    I have a list ItemRenderer that has 2 states. When it initializes, I set it to 1 state and listen for an event that switches it to state 2. protected function onCreationComplete(event:FlexEvent):void{ currentState = "state1"; addEventListener(CustomEvent.Event1, switch); } protected function switch(event:FlexEvent):void{ currentState = "state2"; } The difference between the 2 states is that I hide/show some labels. The problem is that it doesn't work. I still see the visual of the old state, even though if I Alert.show(currentState), it shows the correct state name. I've tried adding the line invalidateDisplayList(); inside the switch function but still no luck. protected function switch(event:FlexEvent):void{ currentState = "state2"; invalidateDisplayList(); } What am I doing wrong. Any ideas how I can get this ItemRenderer to really update?

    Read the article

  • Flex: change item Style on certain Tree based ItemRenderers

    - by Markus
    Hi Everybody, I have a question concerning Tree items. I want to show where a drop action would be placed... The item will be placed in between two existing elements. So what I want to do is, to take the upper item and draw a line underneath it. But I struggling to address the itemRenderer... I have the index for the itemrenderer, but I dont get a instance of that object. Any help is appreciated! Markus

    Read the article

  • How to set variable size for List control item in Flex?

    - by joejax
    The following code display a list of comments using List control. The item height set to a fixed value (150), so it seems working: if the content is too long, the scrollbar shows... However, what I really want is not to set the height but let it to change according to the content size. Is there any way to accomplish this? <mx:List id="commentList" width="100%" dataProvider="{commentSet.commentArrayColl}" rowCount="{commentSet.commentArrayColl.length}" > <mx:itemRenderer> <mx:Component> <mx:VBox width="100%" height="150" > <mx:Text text="{data.commentContent}" /> <mx:Text text="{data.username} ({data.modified})"/> </mx:VBox> </mx:Component> </mx:itemRenderer> </mx:List>

    Read the article

  • customizing item renderer

    - by BretzelPretzel
    i would like the label and message to be on the left of the icon....i would also like the icon to be right-aligned what is the best way to do this? I'm confused by some of the tutorials i'm seeing for custom item renderers since they never explain how to format the renderer mxml, so i haven't figured that out yet although i suspect that's what i need to be doing <?xml version="1.0" encoding="utf-8"?> <s:View xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:components="components.*" creationComplete="imagelistings.send()" title="{data.title}"> <fx:Script> <![CDATA[ import mx.collections.ArrayCollection; import mx.events.FlexEvent; import mx.rpc.events.FaultEvent; import mx.rpc.events.ResultEvent; import spark.events.IndexChangeEvent; import valueObjects.imagelistingclass; [Bindable] private var listings:ArrayCollection = new ArrayCollection(); protected function toursService_resultHandler(event:ResultEvent):void { var listingarray:ArrayCollection=event.result.Chapter1.entry; var entry:imagelistingclass; for each(var plate:Object in listingarray) { entry=new imagelistingclass(); entry.image=plate.image; entry.location=plate.location; entry.html=plate.html; listings.addItem(entry); } } ]]> </fx:Script> <fx:Declarations> <s:HTTPService id="imagelistings" result="toursService_resultHandler(event)" url="assets/chapter1info.xml"/> </fx:Declarations> <s:List id="theList" left="0" right="0" top="0" bottom="0" alternatingItemColors="#000000" contentBackgroundColor="#404040" dataProvider="{listings}" horizontalScrollPolicy="off" > <s:itemRenderer> <fx:Component> <s:IconItemRenderer color="#FFFFFF" fontSize="30" iconField="location" labelField="" iconFillMode="scale" iconScaleMode="letterbox" iconHeight="125" messageField="image"> </s:IconItemRenderer> </fx:Component> </s:itemRenderer> </s:List>

    Read the article

  • Getting fill color inside the itemrenderer in Adobe Flex

    - by Anoop
    Hi All, I am writing a custom item renderer to render a column series in my application. Its a stacked chart and i want to use the same item renderer for both the column series. The color for each series in the stack is different and am setting that in the 'fill' property of the two series. My doubt is how can i get the color specified in the fill property of the column series from the item renderer. if this works then i can very well use the same renderer for both series. Thanks in advance, Anoop

    Read the article

  • Flex ItemRenderer/Editor ComboBox Issue...Puhleezz Help

    - by Mohit
    Hi EveryOne Beginner in Flex ...Even worse with item renderers... Have managed to add a Combobox to a datagrid using a itemEditor... I want to change the options in a combo box depending on the value selected by the user on a previous combo.. In the combo box i want to display a certain value (Model Name ) but for quering a table i'll pass the corresponding code of the model :(... sounds simple enough ..unfortunately not able to implement it I have found this problem on this site but the solution seems an overkill for my "small" problem..was hoping if anyone could guide me towards a more simpler solution... My xml comes as <item><mstValue>CH1</mstValue><mstRemarks>CARRIER</mstRemarks></item> <item><mstValue>CH2</mstValue><mstRemarks>TRANS</mstRemarks></item> <item><mstValue>CH3</mstValue><mstRemarks>YORK</mstRemarks></item> Now i have been able to show the values in a combo .if user selects CARRIER i want to pass CH1(dont know how to do it with itemeditors)...and then fetch values corresponding to CH1 from a table (second part of the problem)...in the sample below i used this.parentDocument.modelComboChanged(this.selectedItem) to pass the selected value ...instedd i need to pass the code for it which comes from the xml...Pls help this making me go crazy.... <mx:DataGrid id="chillerGrid" dataProvider="{chillerGridDp}" editable="true" itemRollOver="{ComponentUtil.setTooltip(event,this)}" itemRollOut="ComponentUtil.resetTooltip(event)" width="70%" height="160"> <mx:columns> <mx:DataGridColumn id="test" headerText="Model" dataField="model" editorDataField="value" editable="true" backgroundColor="#f4f2bd" width="100" > <mx:itemEditor> <mx:Component> <mx:ComboBox creationComplete="{if(text=='')selectedIndex=0;if(data &amp;&amp; data.contactType!=undefined)text=data.contactType.text();}" change="{if(text == ''){selectedIndex=0;if(data &amp;&amp; data.contactType!=undefined)text=data.contactType.text();};this.parentDocument.modelComboChanged(this.selectedItem)}" dataProvider="{this.parentDocument.arrColl1}" text="mstRemarks" labelField="mstRemarks" editable = "false" > <!--<mx:dataProvider > <mx:String></mx:String> <mx:String>Model1</mx:String> <mx:String>Model2</mx:String> <mx:String>Model3</mx:String> <mx:String>Model4</mx:String> <mx:String>Model5</mx:String> </mx:dataProvider>--> </mx:ComboBox> <!--<components:ComboBoxIn dataProvider="{this.parentDocument.arrColl1}" labelField="mstRemarks" /> --> </mx:Component> </mx:itemEditor> </mx:DataGridColumn> <mx:DataGridColumn headerText="Make" dataField="make" editorDataField="value" editable="true" backgroundColor="#f4f2bd" width="100" > <mx:itemEditor> <mx:Component> <mx:ComboBox creationComplete="{if(text=='')selectedIndex=0;if(data &amp;&amp; data.contactType!=undefined)text=data.contactType.text();}" change="{if(text == ''){selectedIndex=0;if(data &amp;&amp; data.contactType!=undefined)text=data.contactType.text();} }" labelField="@label" editable = "false" > <mx:dataProvider> <mx:String></mx:String> <mx:String>Carrier</mx:String> <mx:String>York</mx:String> <mx:String>Trane</mx:String> </mx:dataProvider> </mx:ComboBox> </mx:Component> </mx:itemEditor> </mx:DataGridColumn> <mx:DataGridColumn headerText="Chillers" dataField="chillers" width="200" editable="true"> <mx:itemEditor> <mx:Component> <mx:TextInput maxChars="49" /> </mx:Component> </mx:itemEditor> </mx:DataGridColumn> </mx:columns> </mx:DataGrid>

    Read the article

  • Flex : Adding a click handler on SkinnableDataContainer's items

    - by sebpiq
    Hi, I am new to Flex. What I am looking for here is adding a click handler on all the items created by a SkinnableDataContainer. I tried several things that didn't work, and I have no idea what is the right way to do it. <s:SkinnableDataContainer id="teamList" itemRenderer="TeamSummaryRenderer"> <s:dataProvider> <s:ArrayList> <fx:Object teamName="A super team 1"/> <fx:Object teamName="A super team 2"/> <fx:Object teamName="A super team 3"/> </s:ArrayList> </s:dataProvider> </s:SkinnableDataContainer> Furthermore, I don't want to declare the handler in my custom TeamSummaryRenderer component. I would prefer that the handler code stays at application level. Is there a simple 'Flex-ish' to achieve this ?

    Read the article

  • Fkex : Adding a click handler on SkinnableDataContainer's items

    - by sebpiq
    Hi, I am new to Flex. What I am looking for here is adding a click handler on all the items created by a SkinnableDataContainer. I tried several things that didn't work, and I have no idea what is the right way to do it. <s:SkinnableDataContainer id="teamList" itemRenderer="TeamSummaryRenderer"> <s:dataProvider> <s:ArrayList> <fx:Object teamName="A super team 1"/> <fx:Object teamName="A super team 2"/> <fx:Object teamName="A super team 3"/> </s:ArrayList> </s:dataProvider> </s:SkinnableDataContainer> Furthermore, I don't want to declare the handler in my custom TeamSummaryRenderer component. I would prefer that the handler code stays at application level. Is there a simple 'Flex-ish' to achieve this ?

    Read the article

  • DataGrid - Edit the selected row when a button is clicked.

    - by Chepech
    Hi all. I have a very simple DataGrid with 2 columns, some thing like this: <mx:DataGrid id="grid" > <mx:columns> <mx:DataGridColumn dataField="name" headerText="Name"/> <mx:DataGridColumn dataField="date" headerText="Date"/> </mx:columns> </mx:DataGrid> What Im trying to do is to activate the edition of the selected row when the user clicks a button. So far I've been unable to find any example of how to do this. I already tried 6 or 7 different approaches but non works. Does any one has a clue how to do this? How do you get the selected row (NOT selectedItem) of a DataGrid and how can you: Change the ItemRenderEditor or ItemRenderer on the fly of just that row. Or enable the edition of that specific row without clicking it. This are the questions that I've been unable to answer Help will be greatly appreciated.

    Read the article

  • Datagrid selects the wrong custom cell in my datagrid...

    - by Markus
    Hi everybody, I am working on a problem since a week soon, but I still couldn't make it work as expected. I have a DataGrid which has HBox with a CheckBox an a Label as itemRenderer (see Code below). When I tap in to the Cell the standard itemEditor pops up and lets you enter the content of the label. Thats the standard behavior. I works fine except for 2 problems: If I enter to much text, the horizontal srollbar pops up, and the cell is filled with that scrollbar. As you see I tried to set the horizontalScrollPolicy to off, but that doesnt work at all... I tried to do that for all the different elements, but the failure is still existent. When I have filled more than one row, there is an other mistake happening. If I tap on a row, the datagrid selects the one below that row. That's only if one line is already selected. If I tap outside the datagrid and then, tap at any row the itemEditor of the right row will show up... Is there anything now wright in the setup of my set data method? __ package components { import mx.containers.HBox; import mx.controls.CheckBox; import mx.controls.Label; public class ChoiceRenderer extends HBox { private var correctAnswer:CheckBox; private var choiceLabel:Label; public function ChoiceRenderer() { super(); paint(); } private function paint():void{ percentHeight = 100; percentWidth = 100; setStyle("horizontalScrollPolicy", "off"); super.setStyle("horizontalScrollPolicy", "off"); correctAnswer = new CheckBox; correctAnswer.setStyle("horizontalScrollPolicy", "off"); addChild(correctAnswer); choiceLabel = new Label; choiceLabel.setStyle("horizontalScrollPolicy", "off"); addChild(choiceLabel); } override public function set data(xmldata:Object):void{ if(xmldata.name() == "BackSide"){ var xmlText:Object = xmldata.TextElements.TextElement.(@position == position)[0]; super.data = xmlText; choiceLabel.text = xmlText.toString(); correctAnswer.selected = xmlText.@correct_answer; } } } Thanks in advance! Markus

    Read the article

  • Checkbox Images in List

    - by Bridget
    It seems like it should be a simple concept. I need a vertical list. This list has an image with a checkbox and pathname of that image underneath it. The user should be able to check the checkboxes of the images they want to appear in their "shopping cart". The images, checkbox label, and list are populated by an XmlList. How can I do this in Flex 3.5 and Actionscript and have a button that when clicked, display a list of the checked items??

    Read the article

  • Flex 4 itemRendererFunction problem.

    - by michael
    This is a Flex 4 application: I have created a list as the following: <s:List id="previewList" horizontalCenter="14" verticalCenter="-112" itemRendererFunction="listItemRendererFunction" click="controller.previewListClickHandler()"> </s:List> And I have the itemRendererFunction: public function listItemRendererFunction(item:Object):ClassFactory { var cla:Class = SimpleItemRenderer; if( item.save == true ) { cla = ColorItemRenderer; } else { cla = SimpleItemRenderer; } return new ClassFactory(cla); } The application works fine if the listItemRendererFunction is inside fx:Script. However, when I put the listItemRendererFunction into a class and change to the following: itemRendererFunction="controller.listItemRendererFunction" in the List component. If I run the application, I get the " Error #1009". Please advice how to fix it.

    Read the article

  • how to increase the content of the data in itemrenderer of the list?

    - by maniohile
    hi, i'm binding data into list which comes from the backend ,i want to increase the height of each content,i have used height ='some value',it's get increased ,i want to increase the size of the content with the value of 32 but it didn't get increased but i gave the itemrenderer (hbox)height as 100%..is it any inbuilt bug on flex or bug on me..thank's in advance...

    Read the article

  • Flex 3: Possible to add a Context Menu to a ItemRenderer inside a DataGrid?

    - by gmoniey
    I have an ItemRenderer that is shared by several applications (inside a DataGrid), and I would like to add a context menu to it (rather than in each application). The renderer is derived from the Canvas class, and the code to create the context menu looks something like: var menuItem:ContextMenuItem = new ContextMenuItem("Test"); menuItem.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, contextCallback); var customContextMenu:ContextMenu = new ContextMenu(); customContextMenu.hideBuiltInItems(); //hide flash menu customContextMenu.customItems.push(menuItem); this.contextMenu = customContextMenu; However, when I right click on the cell in the datagrid, I get the default Flash Context Menu. Is this not possible?

    Read the article

  • Creating a column of RadioButtons in Adobe Flex

    - by adnan
    I am having an un-predictable behavior of creating radio buttons in advancedDataGrid column using itemRenderer. Similar kind of problem has been reported at http://stackoverflow.com/questions/112036/creating-a-column-of-radiobuttons-in-adobe-flex. I tried to use the same procedure i.e. bind every radio button selectedValue and value attributes with the property specified in the property of the associated bean but still facing the problem. The button change values! The selected button becomes deselected, and unselected ones become selected. Here is the code of my advancedDataGrid: <mx:AdvancedDataGrid id="adDataGrid_rptdata" width="100%" height="100%" dragEnabled="false" sortableColumns="false" treeColumn="{action}" liveScrolling="false" displayItemsExpanded="true" > <mx:dataProvider> <mx:HierarchicalData source="{this.competenceCollection}" childrenField="competenceCriteria"/> </mx:dataProvider> <mx:columns> <mx:AdvancedDataGridColumn headerText="" id="action" dataField="criteriaName" /> <mx:AdvancedDataGridColumn headerText="Periode 1" dataField="" width="200"> <mx:itemRenderer> <mx:Component> <mx:HBox horizontalAlign="center" width="100%" verticalAlign="middle"> <mx:RadioButton name="period1" value="{data}" selected="{data.period1}" group="{data.radioBtnGrpArray[0]}" visible="{data.showRadioButton}" /> </mx:HBox> </mx:Component> </mx:itemRenderer> </mx:AdvancedDataGridColumn> <mx:AdvancedDataGridColumn headerText="Periode 2" dataField="" width="200"> <mx:itemRenderer> <mx:Component> <mx:HBox horizontalAlign="center" width="100%" verticalAlign="middle"> <mx:RadioButton name="period2" value="{data}" selected="{data.period2}" group="{data.radioBtnGrpArray[1]}" visible="{data.showRadioButton}" /> </mx:HBox> </mx:Component> </mx:itemRenderer> </mx:AdvancedDataGridColumn> <mx:AdvancedDataGridColumn headerText="Periode 3" dataField="" width="200"> <mx:itemRenderer> <mx:Component> <mx:HBox horizontalAlign="center" width="100%" verticalAlign="middle"> <mx:RadioButton name="period3" value="{data}" selected="{data.period3}" group="{data.radioBtnGrpArray[2]}" visible="{data.showRadioButton}" /> </mx:HBox> </mx:Component> </mx:itemRenderer> </mx:AdvancedDataGridColumn> </mx:columns> </mx:AdvancedDataGrid> Any work around is highly appreciated in this regard!

    Read the article

  • How to add separator between items in a Spark List control

    - by simms2k
    I have a s:List where I've defined my own itemRenderer, and would like to insert a horizontal line separating items, similar to the way the mx:LinkBar works. I don't want to have a line at the top or bottom of the list, so I can't just include an upper or lower border in the itemRenderer. I was hoping the itemRenderer could be made aware of its index in the list, but I don't see how. Is there a way to do this?

    Read the article

  • How do I force all Tree itemrenderers to refresh?

    - by Richard Haven
    I have item renderers in an mx.controls.Tree that I need to refresh on demand. I have code in the updateDisplayList that fires for only some of the visible nodes no matter what I do. I've tried triggering a change that they should all be listening for; I have tried clearing and resetting the dataProvider and the itemRenderer properties. private function forceCategoryTreeRefresh(event : Event = null) : void { trace("forceCategoryTreeRefresh"); var prevDataProvider : Object = CategoryTree.dataProvider; CategoryTree.dataProvider = null; CategoryTree.validateNow(); CategoryTree.dataProvider = prevDataProvider; var prevItemRenderer : IFactory = CategoryTree.itemRenderer; CategoryTree.itemRenderer = null; CategoryTree.itemRenderer = prevItemRenderer as IFactory; _categoriesChangeDispatcher.dispatchEvent(new Event(Event.CHANGE)); } The nodes refresh properly when I scroll them into view (e.g. the .data gets set), but I cannot force the ones that already exist to refresh or reset themselves. Any ideas?

    Read the article

  • One DataGrid Item Renderer for multiple columns

    - by user329650
    Hey, 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? Dennis

    Read the article

  • How to get the value of a ComboBox within a DataGrid

    - by Jason Towne
    While this may be a simple problem, I'm having a heck of a time coming up with a solution. I have a DataGrid with a ComboBox as an ItemRenderer for one of my columns. When the user selects a row, I want to get the ComboBox's selected value for the selected row. Any suggestions? Some sample code: <mx:DataGrid id="myGrid" dataProvider="{myData}"> <mx:columns> <mx:DataGridColumn headerText="Column 1" dataField="dataField1" /> <mx:DataGridColumn headerText="Column 2" dataField="dataField2_Array"> <mx:itemRenderer> <mx:Component> <mx:HBox paddingLeft="5"> <mx:ComboBox id="myComboBox" dataProvider="{data.dataField2_Array}" /> </mx:HBox> </mx:Component> </mx:itemRenderer> </mx:DataGridColumn> </mx:columns> </mx:DataGrid>

    Read the article

< Previous Page | 1 2 3 4  | Next Page >