Flex :: Toggling States - When Other Item Is Selected The First Item Does Not Change Its State?
Apr 26, 2011
I have used states in my application.The thing is I have made the first item in my list to be selected. so I gave like this,
if(itemIndex == 0)
this.currentState="selected";
this works fine.The problem is when other item is selected the first item does not change its state,it remains in the selected state until its clicked.My code looks like this,
<s:BorderContainer id="outerCont" width="275" height="100" borderVisible="false"
backgroundColor.normal="#3D3C3C" backgroundAlpha.selected="0.1"
backgroundColor.selected="{data.color}">
My states are like this,
<s:states>
<s:State name="normal" />
<s:State name="hovered" />[code]........
View 1 Replies
Similar Posts:
Feb 15, 2011
I have this datagrid:
<mx:DataGrid id="dgCompetenteN" includeIn="Test" left="10" right="472" top="69" bottom="149"
dataProvider="{colCompetente}" editable="false">
<mx:columns>
[Code]....
What I want to do is, when I select an item in the datagrid, the selected item of the dropdown should be the correct one (the one which has the field idCompSuperioara equal to the third element in the selected datagrid row).
View 1 Replies
Feb 26, 2010
My TileList Contain some text Boxes. i want to change the text color if it's selected.
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
May 19, 2010
I have a menu with many sub menus. I need to change the color of the selected button and then move on to the sub menu. My menu is horizontal and now it's not obvious the path that you follow.
View 2 Replies
Jul 20, 2010
I am in search of finding a way to display shopping cart items in a flash 8 datagrid in the order it was chosen by the user & also to ability to delete an item if the user choses. Currently I have the items displaying however they are displaying in a position as it is stored and called in the array. [code]
View 5 Replies
Feb 2, 2012
I have a list with time related data. the item renderers display this time. I would like to make the item renderers refresh their state/labels upon the tick of a timer.
to which event should I add a listener within the renderer, and how do I trigger such event from the list?
View 3 Replies
Jul 27, 2009
How would i know the item state, whether its open or closed through programming in flex.
I am using Accordian...
View 1 Replies
Jun 4, 2011
I have a combobox with arrayCollection dataprovider, it selects nothing at start, but i see the first object label as selected, i want to add select text, as first option that selects nothing, just to indicate that the user didn't select an option yet.
View 1 Replies
Dec 10, 2009
I am using a combobox for the us states, link. The label is set to the full name of the state, while the value attribute holds the abbreviation. What I want to do is to get the selected item's value. So I tried combo.selectedItem.value and combo.selectedItem.@value, but neither of them worked.
View 2 Replies
Jan 27, 2010
I have a XML based Tree Control. The XML Structure is recursive, so the children's can have the same Element as the parent. I now want to let the user add and remove the elements. Do do so I need to get the parent element of the selected Item. Following code I already collected together:
var selected:XML = treeControl.selectedItem;
parent.insertChildAfter(selected:XML, newElement);
I just don't know how to get to the selected parents node as there is no such method like treeControl.selectedItem.parent.
View 1 Replies
Feb 3, 2010
I have a TileList with thumbnail images. Under each thumbnail images I display the name of the image. I want to build rename functionality. So under the TileList is a "Rename selected image" button.
When this button is clicked, I would like to change the state of the itemRenderer component. The label underneath the image will change into a TextInput so that the user can type a new name. This is much like the Windows rename file functionality.
How can I access the itemRenderer of the selected image? How can I make it happen that it listens to the click event of the Rename button?[code]...
View 3 Replies
Jul 18, 2011
I am using FlashBuilder 4.5 for PHP. I have a simple MySQL table with the fields {tID, tName}.I am able to populate a DropDownList in a Flex form as below. The DropDownList shows the name of the people without problem:
<s:Form defaultButton="{button}">
<s:FormItem label="myList: ">
<s:DropDownList id="dropDownList" creationComplete="dropDownList_creationCompleteHandler(event)" >
<s:AsyncListView list="{getPeopleResult.lastResult}"/>
[code]....
The above does not work.
View 2 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
Mar 4, 2011
I want to set a gradient background for the selected item in my AdvancedDataGrid
View 1 Replies
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 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
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
Mar 30, 2010
I've just recently started out using Flash Builder and have a question surrounding states. In fact I'm not entirely sure it is related to states but read on and I hope it will become clearer. I currently have a custom component that contains 3 comboboxes. This resides in a TabNavigator component. The TabNavigator consits of 5 pages (Tabs). The custom container holding the comboboxes should display the same selected data across all Tabs. ie. If I am in Tab1 and select an item from one of the comboboxes then click on Tab2 I need to mirror the combobox's selection in Tab2.
View 1 Replies
Jun 21, 2010
Isn't there a better way to accomplish this?[code]...
All I want to do is make sure that when I update the item that the comboBox is pointing to internally, that it's selectedIndex also update so that the label within the ComboBox reflects the new value.
View 1 Replies
Mar 3, 2011
I have a combobox that act as autosuggestion for a search application. Search function is getting triggered by a search button. I also want to trigger the search function either when the item in combobox is double or single clicked. Code:
[Code]..
View 2 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
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
Jul 24, 2011
I have a Flex (3.5) Tree with drag & drop support, but the problem is that after I drag an item (node) and drop it, it's supposed to be the selected item in the tree, but for some reason it's not highlighted.
View 1 Replies
Sep 3, 2009
I have a ComboBox with a label function like this one:
private function fieldLabelFunction(item:Object):String {
return resourceManager.getString('dashboard',"SS." + item);
}
When I change locales, the labels display correctly in the ComboBox's dropdown list, or if I change a selection. However, the currently selected item's label doesn't refresh at first. Is there a way to force the labelFunction to get called again?
View 1 Replies
Nov 14, 2011
I just want to acquire the existing label from the currently selected item in a ComboBox. I populated it with a DataProvider with a list of strings and it will not allow me to get the currently selected label, especially if I input a new one, not included in the DataProvider
View 1 Replies
Jan 20, 2010
We have a requirement to show a list of appointment slots. So every hour of a schedule has a set of 10 min slots. The requirement is that if we click on a arrow button at the 8:00, 9:00 hour slot, the layout of the hour slots should change from a vertical list to a horizontal list.For this we modeled the system as follows:ScheduleComponent ->(contains) -> List (Hours of schedule)The HourViewComponent is an Item Renderer, that displays the 10 mins slots based on the available appointments by using a Slots List (list of slots in the 8:00 hour). For the Slots List we have a Slot View Component as an Item Renderer.Now the issue is that when we click on the 8:00 slot we are able to change the HourViewSlot from a VerticalState to a Horizontal state. But The container height is not collapsing in the minimized state. It occupies the same size as the vertical layout! We tried using variableRowHeight attribute.
View 1 Replies
Jan 2, 2010
If I have several items that move across the screen but the user can click any of them at any time, how do I record the current position of any of the items item in order to use that data to change the position of the item after the user clicks?
This is what I am doing: I have 11 images that slide accross the screen. The user can click any of them at any time. When he clicks one I am scaling the image so it looks like it is comming forward (z axis) and then the rest of the images are scaled down so it looks like they are going back on z axis. So what I am trying to do is get the current position of the image when the user clicks the image so that I can use that to correctly estimate the scaling and moving of the image to make it look like it scales from the center and not from the top left corner. So if have a variable that gets the current position of the image being clicked I'm thinking I can change its position using something like: x = currentposition + -45;
View 9 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 4, 2011
<mx:itemRenderer>
<mx:Component>
<mx:Canvas>
[code]......
View 2 Replies