Flex :: Scroll To Selected Item In Spark List Component?
Oct 21, 2009
I'm setting selected element in s:List component with Actionscript, it works, but List doesn't scroll to selected item -- need to scroll with scrollbar or mouse. Is it possible to auto-scroll to selected item
View 8 Replies
Similar Posts:
Jun 17, 2011
I have a list with custom item renderers. What I would like is when one of the list items is selected to position another control OUTSIDE the list to the same vertical position as the selected item.
View 2 Replies
Oct 17, 2011
I have a regular spark list which is sorted correctly when no item renderer is used. However, when the following item renderer is used, the list shuffles and displays items from previous instances of the list.[code]
View 2 Replies
Jan 19, 2011
I change an item in Spark List. The item then moves to a different index in the list since I keep the List's dataProvider sorted. However, the selectedIndex stays where the item used to be. I want the List's selectedIndex to still be on the item that changed.
View 1 Replies
May 6, 2010
I can still keep the color of selected item even if it's rolled over? In my code, I have specified both the selectionColor and rollOverColor as below:
videoList.selectionColor = "0xCC0033"; //red
videoList.rollOverColor = "0xE9F3FF" //light-blue
It works well except when the selected item is rolled over. When the selected item is rolled over, it changes the color from red to light-blue. I want the selected item to stay red even when it's rolled over, but haven't found a way to achieve this.
View 2 Replies
Jul 1, 2011
I have a renderer that looks like this:
[Code]...
Loading thumbnails using this method works perfectly. The issue happens when you scroll the List.
View 1 Replies
Jun 30, 2011
My stakeholder has a request to remove the currently selected item from the DropDownList control(s) in the application. For example a drop down with [item1, item2, item3, item4] if item2 is selected then the only items in the drop down will be [item1, item3, item4]
Using Flash Builder 4 with Flex 4.0 sdk
View 2 Replies
Apr 29, 2010
I have a spark list, which is based on a dataProvider. As the application runs, the data in the dataprovider can change, and also the dataProvider can be swapped for a different one
What I need to do is make sure that something is always selected in the list (unless it is empty)
View 1 Replies
Sep 2, 2011
I'm having a problem with getting the value of an item that the user selects in my mobile Flex application. When I select an item from the list I place that item into an ArrayCollection. But when I check the value (trace()), the value is [object Object] and I can't seem to access the actual value of the object. Here is what I am doing:
private var selectedPlayers:ArrayCollection = new ArrayCollection();
private var numOfPlayers:int;
...
//check if item is not already in selected players list
[code]....
View 2 Replies
Jun 25, 2010
I have two spark lists and want to drag items from one list to the other. When im dragging an item and over the other list item, i want the target item to change the background coloer.Basically instead of showing the black line indicating that I will drop between elements, I want to see the target item highlight.
View 1 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
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
Jan 3, 2011
I'm trying to make a simple flash application providing interface for taking tests as a high school assignment. One of the requirements is to use an XML file as data source.Now, having a List component bound to the XML file with questions consisting of data such as question body, question type (ie. single choice, multiple choice, open, image etc.) and possible answers (where applicable), I was wondering if I could add some additional data (and what is the best possible way to do so) to each question upon its transfer to the List component.
I am trying to achieve two main goals with this: firstly, to mark the questions to which an answer has already been given, like with such code in ItemRenderer class:
<s:Label color="{data.color}" text="{data.label}"/>
Where data.color would be set whenever the user gives an answer to a question.
Secondly, while at it, I thought of such possibility as a great way to store answers given to particular questions. In this case, the Class of the answer object would have been Object, since there has to be many type of questions (where the answer could also be a Bitmap for example).
View 2 Replies
Dec 17, 2009
In Flex 4 (beta 2), I have a list control populated from an XMLListCollection. What I would like to do is when an item is selected in the list, use a custom item renderer on the selected item as well as the item that appears just prior to the selected item in the list.
I am using a spark list control, but I am open to alternate components if the solution makes sense.Here is the strucutre of the xml used to populate the XMLListCollection
<Images>
<Image>
<Id>1</Id>
<Url>http://www.mydomain.com/image1.png</Url>
[code]....
View 1 Replies
Apr 12, 2011
In a flex application how to display default selecteditem from the dataprovider of the combobox.
I'm using {staticdataholder.currencylist}.
For example: I have to show INDIA so it should be selected as default from the list.
View 2 Replies
Feb 9, 2010
I have a List component using multiple item renderers determined by the itemRendererFunction. When I set the data the first time, it works as expected. Then, when I set the data a second time with new data, it doesn't call the itemRendererFunction and tries to reuse the current renderers even though they don't match the data.Once I scroll, the function is called and the correct renderers are used. I tried calling invalidateDisplayList and such prior to setting the data, but that didn't fix the problem.
View 3 Replies
Aug 3, 2011
I have an issue with Spark Lists whereby I am trying to ensure that an item is always selected and ensure that the GUI displays this to the user.
The application (full code below) creates a List, a Label and a Button. The Label states what is selected in the List. The button removes the selected item. Changing the selection, updates the text in the Label. Important: The List has "requireSelection" set to true to ensure that an item is always selected.
If I select the first item in the List, the selection is correctly reflected in the label. Clicking "Remove" removes the item and the next item is selected. This is all working correctly.[code]...
View 1 Replies
Aug 9, 2010
How can I set the scroll position for a Spark List control?
View 1 Replies
Dec 15, 2011
I have a spark datagrid on a mobile application, I set the
interactionMode="touch"
and the dataGrid scrolling is good, I got some problems adding a selectionChange eventListener to it, because scrolling the dataGrid will automatically change the selection and instead simply scrolling it, the function binded will start...
How can I add the touch dalay before select the index, so if I scroll the grid the selection won't change, and it change only if I press the item without scrolling?
View 1 Replies
Aug 3, 2010
In a spark list I could use the change event to find out which item has been selected or deselected. The dispatched IndexChangeEvent object has the properties newIndex and oldIndex holding this information.
But with multiple selection allowed this doesn't work anymore because newIndex and oldIndex could refer to indices of still selected elements.
A solution would be to copy the selectedIndices vector to another variable and compare this variable with selectedIndices after a change in selection, but this seems to be somewhat complex.
Does anyone know if there is an easy way two get the index/item a user is deselecting while other elements are still selected?
View 2 Replies
Dec 21, 2010
I have a spark List defined as:
<s:List id="symbolList" dataProvider="{symbolListCollection}" change="symbolNameChangeHandler(event)"></s:List>
With the change handler defined like this:
protected function symbolNameChangeHandler(event:IndexChangeEvent):void {
symbolList.validateProperties();
changeSymbolView(symbolList.selectedItem);
}
and symbolListCollection as an ArrayList filled with Strings.
At first, the change event works fine, and I get what I expect.
However, if I Ctrl-click on the selected item, to de-select it, i am unable to ever select an item again.
When I click on something to try to select it, the change event DOES fire, however, the ItemChangeEvent has both oldIndex and newIndex set to -1
View 1 Replies
Mar 7, 2011
I have a component extending a Spark List, and when I scroll using the mouse wheel it scrolls too much in one go. I have tried looking for the handler that deals with mouse wheel scrolling in the List class and VerticalLayout class to override but I cannot find it.
View 1 Replies
Dec 8, 2011
I have prepared a simplified test case for my question. It will run instantly in your Flash Builder if you put the 2 files below into a project.I'm trying to display a List of strings and a confirmation checkbox in a popup:In the real application I dispatch a custom event with the string selected in the list, but in the test code below I just call trace(str);My problem: if I use click event, then the window closes, even if I click at a scrollbar (the !str check below doesn'twhen an item had been selected in previous use). And if I use change event, then the window doesn't close, when I click on the same item as the last time.riting a custom item renderer and having a click event handler for each item seems to be overkill for this case, because I have strings in the list.Test.mxml: (please click myBtn few times - to see my problems with click and change)
<?xml version="1.0" encoding="utf-8"?>
<s:Application
xmlns:fx="http://ns.adobe.com/mxml/2009"
[code]........
View 3 Replies
Oct 6, 2010
I have a Spark List (spark.components.List) backed by an ArrayCollection for its dataProvider. The List has a vertical scrollbar when there's too many rows to display. What I want is when a new row is added to the List for it to scroll to the bottom to show that new row.
I've tried calling List's ensureIndexIsVisible from a listener on the ArrayCollection. This doesn't work because the List hasn't yet fully rendered the new row. It will either scroll to the second from the last row, or throw the exception:
[Code]...
View 3 Replies
Aug 2, 2010
How to skin spark List component so that every adjacent itemRenderer has different color (something like mx DataGrid)?
View 1 Replies
Jun 2, 2010
When I set style color, it changes both the text color for the selected item/component label and the text in the dropdown menu.
color
Type: uint Format: Color CSS Inheritance: yes
Color of text in the component, including the component label. The default value is 0x0B333C.
I would really like the label to be white and the text to be black.
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
May 20, 2011
I have found something good here. [URL]..The mouseover effect on the list item is good. Any ideas to make this look.. I can infer that this is happening on mouseover of the Image Component. I think this is similar to google image search preview of images. If anyone have come across a component similar to this kindly share it to me and to all.
View 1 Replies
May 19, 2009
I have a list component and I have an item editor for the items in the list. I would like to have a button that the user clicks once they are done with their changes because I am having them edit multiple pieces of data in the editor and I would also like to validate the data before closing the editor as well. I just don't know what to do on the button's click event to make the item editor close and commit it's changes to the data provider.
View 3 Replies
Jul 15, 2009
scroll selected item to top or center?
View 1 Replies