Access to the information in the list component

I've attached a screenshot of information Ineed to 'to '. I'm still relatively new to Flex and I have a total disconnect what code use so I tried all kinds of properties and functions. Now I'm really confused. I want the user to be able to remove one of the restaurants, and then send the list to themselves. The listComponent ID is favoritesList. The dataProvider comes from drag - move to a datagrid control. The dataProvider of the DataGrid is a collection arrayCollection with the id restaruatnsAC.

Thank you

This trick is to create a second, empty, collection ArrayCollection that is bound to the data in the list drop-enabled.  When you want to do something for the items in this list, you just work with this 2nd ArrayCollection collection.  Heres a code:

"http://www.adobe.com/2006/MXML" xmlns:ns1 ="*" >

Import mx.collections.ArrayCollection;

[Bindable]

private var ac:ArrayCollection = new ArrayCollection([)

{restaurant: 'Restaurant 1'},

{restaurant: 'Restaurant 2'},

{restaurant: "Restaurant 3"},

{restaurant: 'Restaurant 4'}

]);

[Bindable]
private var ac2:ArrayCollection = new ArrayCollection();

private function removeSelected (): void {}
AC2.removeItemAt (chosenList.SelectedIndex);
}

]]>


   
       
   


   
       
   

I hope this helps.

Joe

Tags: Flex

Similar Questions

  • How do access you the list of programs that start when you start your computer?

    How do access you the list of programs that start when you start your computer?

    Saturday, January 19, 2013 19:48:16 + 0000, Psylly wrote:

    How do access you the list of programs that start when you start your computer?

    First of all, note that you should be concerned all the programs
    starts automatically, not only those who enter in the system tray.
    Not all the programs auto-start manifesting by an icon in the
    Status bar.

    On each program, you don't want to automatically start, check its
    Options to see if he has the choice of not start (make sure you)
    Indeed choose not to run, not just a "don't show icon.
    Optional). Many can easily and better be arrested like that. If that is not
    work, run MSCONFIG from the start. Run the line, and then click the Startup tab.
    Uncheck the programs that you do not want to automatically start.

    However, if I were you, I wouldn't do it just for the application of
    the minimum number of running programs. Despite what many people say
    You should be concerned, not with the way that a lot of these programs
    you run, but who. Some of them can degrade performance severely, but
    others have no effect on performance.

    Don't stop all programs to run willy-nilly. What you need to do
    is to determine what each program is, what its value is up to you which
    the performance cost is its running all the time. You can try
    Internet search and ask questions about the details here.

    Once you have this information, you can make a smart informed
    decision on what you want to keep and what you want to get rid of.
    Ken Blake, Microsoft MVP

  • Feed the list component with labels that have only certain values.

    I have to be able to sort out shorter labels in the component 'listHolder.list' by values in 'Fan', 'Herdighet', etc., which will be selected of the other items in the list
    (those who do not need to be fed by XML, but the list items own dataProvider)

    Practical example: displays only the labels in listHolder.list that are connected to the "H1" value in "Herdighet" or "H2" "Herdighet" etc.

    I am fairly new to AS3, so I do not know how to start. I appreciate everything you can give clues.

    Here's the code so far:

    //--------------------------

    var loader: URLLoader = new URLLoader();

    loader.addEventListener (Event.COMPLETE, onLoaded);

    listHolder.list. addEventListener (Event.CHANGE, itemChange);

    function itemChange(e:Event):void {}

    var selectedObj:Object = a [listHolder.listSelectedIndex]

    var xml;

    var a: Array = [];

    function onLoaded(e:Event):void {}

    XML = new XML (e.target.data);

    var it: XMLList = xml. Lauvtre;

    for (var i: uint = 0; i < il.length (); i ++) {}

    listHolder.list.addItem ({.child('Botanisk_navn').toString ()label: it [i]+ "\n"+ "-" + it [i].child('Norsk_navn').toString () "});

    a [i] = {'Fan': it [i].child('Farge').toString (), 'Herdighet': it [i].child('Herdighet').toString (),}

    "Høyde": he [i].child('hoyde').tostring (), "Botanisk_navn": he [i] .one ('Botanisk_n avn') m:System.NET.SocketAddress.ToString (),.

    'Norsk_navn': it [i].child('Norsk_navn').toString (), 'Image': it [i] .child ('image'). toString(),

    {"Blomstring": he [i].child('Blomstring').toString (), "Lysforhold": he [i] .one ('Lily book') m:System.NET.SocketAddress.ToString ()};

    }

    }

    Loader.Load (new URLRequest ("lauvtre.xml"));

    Fusion is a good thing.  The more you have to understand this, easy it all comes together when the lights start to go.

    In regard to the 'a' table... If you look at how values are it is attributed originally, they are attributed to the 'i' value of the index.  So, if the first element that passes the test of H1/H2 is the 10th 'i', it means that 10 of the table value is assigned to the first value you found.  The first 9 values in the table are zero as a result.

    But if you use the method push of the array class.

    a.push ({"Fan": he [i].child('Farge').toString (),... etc...});

    then the item is added to the index of the table rather than the 'i' the next clue.  If a table will have the same number of elements as the list and the list and table will agree in regard to pair them up.

  • Horizontal scrolling in the list component

    Hello

    I use a list component, which is filled from a textbox control.  I set the horizontal scroll policy to automotive and also we however scrolling does not appear (in the case of auto) or does not move (in the case of it).  Is there a setting I need to change to make the scrolling work normally?

    Thank you

    you need not use invalidate().  use:

    lc.horizontalScrollPolicy = ScrollPolicy.ON

    lc.maxHorizontalScrollPosition = 200;   Use an appropriate number

  • We have access to the list of addresses in outlook by programming?

    Hi all

    I want to build an application in which I'm going to display a list of addresses in outlook to send the e-mail.

    Please tell me how programmtically I can extract the list of addresses to outlook?

    Thanks in advance...

    You can use the global method BlackBerryContactList.lookup to perform a search in the address list to the user.

  • generate the List component: make all child elements on createComplete?

    Hello

    It is my understanding that a list created only children who are visible and children who lie immediately next to the display window. When scrolling, the other children in the list are created when they are ready to be displayed in the display window. I understand that it is an internal mechanism to free up memory and speed up the rendering of provision process.

    My question is, it is possible to set a property or to create a method to add all children is made in the list at present, it is created, rather than limiting children to only close the display window? Thank you b

    For the Spark list, I'll try defining a layout custom with useVirtualLayout = false

    Alex Harui

    Flex SDK Developer

    Adobe Systems Inc..

    Blog: http://blogs.adobe.com/aharui

  • Quirk with the List component

    Here is my example: http://www1.esc.edu/personalstaff/dcook/sandbox/flash/HumanitiesModel/ugh.html
    Here's the XML code: http://www1.esc.edu/personalstaff/dcook/sandbox/flash/HumanitiesModel/navigation.xml

    Here's my problem... If you click on the assignment/notebook on the office button and it fills the list box with the corresponding XML links. However, the list box (#7-12) keys do not work: 'Start transfer #6' - 'Start transfer #13 "? I'm sure that it has nothing to do with the validity of the XML, but it probably has something to do with the properties of the list box hit region?

    Suggestions are greatly appreciated!
    Thank you
    Damon

    You probably have a text area sitting at the top of the list - note the circumflex accent rather than the pointer cursor. If you scroll down, you will notice that the problem elements of change.

  • Flex Mobile: View parent access within the itemrenderer component Variable

    I have several images in a list and I want to display 4 of them both on the screen with a provision in mosaic with the width of each image = 50% of the height and width of screen = 50% screen height.

    I was able to do this with the code below.

    < s:List id = "list1" width = "100%" height = "100%" >

    < s:ArrayCollection >

    < fx:Object id = "img1" img_url = ' assets/1 - 1.png' title = "Image 1" / >

    < fx:Object id = "img2" img_url = "assets/1 - 2.png" title = "Image 2" / >

    < fx:Object id = "img3" img_url = "assets/2 - 1.png" title = "Image 3" / >

    < fx:Object id = "img4" img_url = "assets/2 - 2.png" title = "Image 4" / >

    < / s:ArrayCollection >

    < s:layout >

    < s:TileLayout

    columnAlign = "justifyUsingWidth" horizontalAlign = "center" verticalAlign = "middle".

    paddingBottom = paddingLeft '0' = '0' paddingRight = paddingTop = "0" "0".

    horizontalGap = "0" verticalGap = "0".

    / >

    < / s:layout >

    < s:itemRenderer >

    < fx:Component >

    < s:ItemRenderer >

    "< s:Group width ="160"height ="240">" "

    < s:BitmapImage source = "{data.img_url}" scaleMode = "stretch" smooth = 'true' "

    Width = "100%" height="100%"/ >

    < s:Label text = "{data.title}" left = low "0" = "0" width = "100%" / > "

    < / s:Group >

    < / s:ItemRenderer >

    < / fx:Component >

    < / s:itemRenderer >

    < / s:List >

    However, I don't want to hard code the width and height values.

    I am able to get the screen specify height and width in the event viewAcivate of the view, as shown below.

    protected function view1_viewActivateHandler(event:ViewNavigatorEvent):void

    {

    ScreenWidth = screen.width;

    ScreenHeight = screen.height;

    }

    How to apply these values for width/height of the group properties in the itemrenderer?

    Something like...

    < s:ItemRenderer >

    "< s:Group width ="{ScreenWidth/2}"height ="{ScreenHeight/2}' > ' "

    < s:BitmapImage source = "{data.img_url}" scaleMode = "stretch" smooth = 'true' "

    Width = "100%" height="100%"/ >

    < s:Label text = "{data.title}" left = low "0" = "0" width = "100%" / > "

    < / s:Group >

    < / s:ItemRenderer >

    parentDocument.height

  • How to display the list of components in ultiboard 10?

    The DRC report the errors where the components that are no longer in the design have been removed. How to display the list component and then remove them from the netlist to stop this?

    Ultiboard reported missing errors of component (part 'X' is not about design) because the part is always referenced by a net. To fix this, you must remove the part of the net. Following the steps below to remove the part form the net.

    1 tools > Netlist Editor

    2. for each network that the part has been connected to, select the Net (upper-left).

    3. Select the tab of pine trees, select the part and it is the PIN in the dialog box, then click on remove

    The problem is when the part is removed, I see no easy way to determine the threads you need to remove the part of. I entered this as a feature request to make this easier, but as a workaround, you can put part and say Ultiboard what the missing part, then search the net names on the pins and remove the part of these pins

    1 place a piece with a lot of pine trees (for example the part that was removed, or for example through Hole technology > Connectors > SIL & headers > HEADER2X9). When you place the part, make sure that the RefDes matches the RefDes of the part which has been removed.

    2. once the room is placed, you should see rats nest lines that connect the part to the nets.

    3 Zoom on the pins. You should now see the net name on each of the axes. For each of the pins connected, remove it from the net as described above.

    4. remove the part that you placed.

  • Container comes now, but the list is not... boo

    -All right, so the container is good to go now, I have this to try to get the built list.

    var cont:Container = new Container();
    cont.margins = Vector.([5,5,5,5]);
    cont.debugColor = 0x33FF33;
    cont.setSize(200, 100);
    
    _individFoods = new Array();
    
    for (var i:int = 0; i < json.foods.length; i++)
        {
        if (json.foods[i].brand == "")
        {
        _individFoods[i] = { label: json.foods[i].name };
        }
        else
        {
    _individFoods[i] = { label: json.foods[i].name + '(' + json.foods[i].brand + ')' };
        }
    }
    
    if (_dropCreated == false)
    {
        _list = new List();
        _list.containment = Containment.BACKGROUND;
        _list.dataProvider = new DataProvider(_individFoods);
        cont.addChild(_list);
        _dropCreated = true;
        addChild(cont);
    }
    

    Anything whatsoever reach senior year as strange?

    Hey,.

    a couple of things stand out - first you don't seem to be of the size of the list. I think that the list component he requires in order to make the list. and the second because you set the size of the front of the container, its best to do a cont.layout () after you are done to add children to the containing element. Good luck!

  • How to change the position of the scrollbar component combobox

    Hello

    I would like to change the position of the scroll bar in a drop-down list on the right to the left box.

    Please advice.

    Thank you

    Yair Papo

    You can use the dropdown combobox property ' to reference the list component and then use the list component verticalScrollBar property to reference the scrollbar control.

    you will probably need to use the move() method to change its position rather than assign x, y properties and you will probably need to wait until the rendering is complete before attempting to assign its position.

  • selector of color and the list of fonts in the options for the widget?

    Is it possible to add a color to the options for the widget selector? How about access to the list of fonts of the site?

    The new version of Muse, available today, has support for the color picker and the file picker. Still no list of fonts.

    MuCow Documentation

  • Complex itemRenderer (list in the list), how can I disable scrolling?

    Hey people,

    so im struggeling for a while with a scrolling problem now.

    I'm developing an application flex with a few complex views. On points of view is like a word document view. It extracts data from the database, represents the specification. You can also modify the data in this view "word". Basicially, it should work like microsoft word. This point of view works fine but I have a problem with it: scrolling!

    To achieve this point of view, I have created a complex ItemRendererClass that contains another complex ItemRenderClass. Imagine it like this >

    -List of chapters (itemrenderer)

    -Chapternumber + titrechapitre

    -ChapterText

    -ChapitreGalerie

    -List of data (itemrenderer)

    -Requirementnumber

    -RequirmeentText

    -Photos

    -lots and lots of attributes

    -...

    Overall, I'm really happy about how the view 'word' & editor works but if im scrolling down and im on the second list, which is a list of the requirements I can't scroll more, when the mouse is on the list item, I can scroll again. What I did is use virtuall layout on both lists for performance reasons and the second height of lists is a 100%, so the second wheel never appears. I tried to disable scrolling second of the second list with 'this.scroller.setStyle ('verticalScrollPolicy', 'off'). But nothing happens. I want a normal scrolling behavior, means that it shouldn't matter where, in the 'wordview"mouse is that I want to scroll as if it were a single list and not 2 lists.

    I would appreciate a tip where I should look for advice, or maybe someone I the community has faced the same problem.

    Thank you

    Markus

    Thanks for your advice.

    I solved the problem in another and for me more easy way.

    What I did that I created a skin for the second list. In this skin, I just removed the scroller component. In addition to this, I had assigned the scrolling in the second for the parent of the list component.

    Works like a charm so far.

    Thank you

    Markus

  • In the list pane highlight color

    Hello

    Can someone tell me how to change the color of blue that the list component uses for the currently selected item by default.

    myList.highlightColor = something;?

    Thank you very much

    -Double-click on your list.  -> goto frame 2

    -Doubleclick 3. (Cell Renderer Skins)-> goto frame 2

    and you will see

    There you can favorite doubleclick, States out of service...

  • In any case for the value Compenent of the list is NOT anti-aliased text?

    As you may know, pixel fonts are tiny size, specially created for NOT being anti-aliasing. Use you the size of 8, with anti-aliasing pixels, the value "bitmap (no anti-alias) '.

    But I can't find how to specify this parameter for a list item type. I can incorporate the police and get to use the police, but he alias against it. Any ideas? Thank you

    Nevermind, it seems that the clip that the List component was inside was not aligned to pixels the same.

Maybe you are looking for

  • Satellite R630 - software video capture need internal

    Help! I have a laptop Toshiba Satellite R630 with Skype installed.The video part of Skype works perfectly fine, but I can't find a software on my laptop which allows me outside Skype to capture video recordings using the camera built into the laptop.

  • Qosmio G20: Question on lack of cooling

    How many people have had 2 hardware failures in 18 months? Including a cooling failure. Very inconvienent when in the middle of an ocean!

  • Qosmio F60-111 - HDD is dead

    I have a Qosmio F60-111 6 months ago and I have a problem with the hard drive.The computer expert my computer has a sensitive hard drive, even just a low vibration can destroy or damage my hard drive. My hard drive is now damage because of this sensi

  • Delete account iCloud iPhone without password

    Hello Years, I bought an iPhone4S. I used my apple ID to sign in iCloud and iTunes. The user name of my ID Apple was my Hotmail account that I created a couple of years ago. At some point I stopped using my Hotmail account. I've updated my Apple ID t

  • What printer all-in-one works the best?

    I have order a MX922 from Amazon, but too late saw the comments on problems with printing on envelopes and cardstock.  Is there a Canon model that still has a lot of features like MX922 and a reputation without problem?