Can you drag and drop within the same list*?

*without completely strange things happening?
It seems like this ought to be fairly straight forward. This
code is taken from the Flex 2 Component Explorer and I've just
added a few Drag and Drop parameters to the list. It doesn't quite
work. The items are duplicated, not selected, selectable. The
behavior is a bit erratic.
It seems very natural to want to be able to re-order a list
using drag and drop so it seems like it should be easy. Obviously,
I could create a second, empty list--but that would take up
valuable screen real estate. I've seen a few posts about this and
none of them were answered so either the solution is obvious
(please share) or it's impossible (please share).
Cheers,
Steve
<?xml version="1.0"?>
<!-- Simple example to demonstrate the List Control -->
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml">
<mx:Script>
<![CDATA[
[Bindable]
public var selectedItem:Object;
]]>
</mx:Script>
<mx:Model id="mystates">
<states>
<state label="Alabama" data="AL"/>
<state label="Alaska" data="AK"/>
<state label="Arizona" data="AZ"/>
<state label="Arkansas" data="AR"/>
<state label="California" data="CA"/>
<state label="Colorado" data="CO"/>
<state label="Connecticut" data="CT"/>
</states>
</mx:Model>
<mx:Panel title="List Control Example" height="75%"
width="75%"
paddingTop="10" paddingBottom="10" paddingLeft="10"
paddingRight="10">
<mx:Label text="Select a state to see its
abbreviation."/>
<mx:List id="source" width="100%" color="blue"
dataProvider="{mystates.state}"
change="this.selectedItem=List(event.target).selectedItem"
dragEnabled="true"
dropEnabled="true"
dragMoveEnabled="true"/>
<mx:VBox width="100%">
<mx:Label text="Selected State:
{selectedItem.label}"/>
<mx:Label text="State abbreviation:
{selectedItem.data}"/>
</mx:VBox>
</mx:Panel>
</mx:Application>

The answer is, yes you can. However, I'm not sure why this
makes a difference.
I added creationComplete="init();" to the application tag.
<em>Removed the model</em> and implemented this method:
public function init(): void {
source.dataProvider = [
{label: "Alabama", data: "AL"},
{label: "Alaska", data: "AK"},
{label: "Arizona", data: "AZ"},
{label: "California", data: "CA"},
{label: "Colorado", data: "CO"},
{label: "Connecticut", data: "CT"}
and removed the dataProvider attribute from the List tag.
Can anyone tell me why the one works and the other
doesn't?

Similar Messages

  • I deleted i photo from search folder, reloaded the software and now I can not drag and drop to the desktop. Help

    I deleted i photo from search folder, reloaded the software and now I can not drag and drop to the desktop. Help

    Look in the Applications folder to see if iPhoto is still there. If it is drag it back to the Finder Sidebar. If it is no longer in the Applications folder post back, you can also look in the Trash it might still be there.

  • How can we restrict the type of components that can be dragged and dropped from the sidekick CQ

    how can we restrict the type of components that can be dragged and dropped from the sidekick CQ

    Generally drop the components at parasys. The components allowed on the parsys is control via the design mode of the page.So restrict components at the design of the parsys. http://dev.day.com/docs/en/cq/current/wcm/working_with_cq_wcm/using_edit_designandpreviewm odes.html#Design%20Mode

  • Can you drag-and-drop music onto the iPhone in iTunes?

    New to iPhone and only just braking it in, as it were.
    It looks like the only way I can upload music onto my iPhone is via synching my entire library onto it. Which, if I may say so, is an incredibly stupid and debilitating design - amongst other severe shortcomings of the iPhone I am slowly discovering over time. Is it not possible to drag-and-drop like the good old iPods?
    If this is indeed the only way to load music, what's the easiest I can pick out my favorite 2000-or so tunes and put them on there?? Don't tell me it's clicking on the boxes next to the songs in the Library page, because that's when I will start asking for my money back...
    Cheers

    I don't blame this person whatsoever for making the assumption that the iPod portion of his phone would work similarily, if not the same, as the iPod.
    But it does work the same as the iPod. As with an iPod, you can sync all songs and playlists, or selected playlists, or you can manually manage music and videos. You can also select sync only checked songs and videos under the Summary tab and uncheck the songs in your iTunes library that you don't want transferred to your iPhone. This can be used with syncing selected playlists - if you want to remove a song from your iPhone that is in a selected playlist without removing the song from the playlist in iTunes, you uncheck the song in the playlist in iTunes followed by a sync. There is no difference with an iPod in this regard except for the iPhone not supporting disk mode.
    In order to manually manage music and videos with an iPod, you must select this under the Summary tab for the iPod sync preferences, and the same for the iPhone.
    And if you resent his rant, why respond and waste your volunteer time on this post?
    I can waste my time anyway I see fit. If you don't like it, don't respond.
    And not everyone can afford to replace this type of investment on a whim.
    Copied from the OP's post.
    Don't tell me it's clicking on the boxes next to the songs in the Library page, *because that's when I will start asking for my money back...*
    Or the iPhone can be sold to someone else with the proceeds used to purchase a different phone. I haven't read any reports about someone having trouble selling their iPhone used at a good price even if damaged.

  • I used to be able to move tabs right or left by drag and drop in the same browser window. Now, after updating to 35-Mac, i can't do that. How can I do that now?

    using FF 35 on MacBook Pro

    Thank you for your response -- It seems the "classic theme restorer" add-on is the problem. With that enabled I cannot move tabs. With it disabled I can. I've used that add-on for years without issue on Mac and PC. The PC is still fine, just the Mac is problematic since the FF update about a week ago.
    So I guess that's the answer unless anyone knows of some other trick or setting to change so FF is able to have tabs below the address bar AND be able to move tabs left to right within the same browser window!

  • Can you drag and drop programs from 1 computer to the other??

    I have finalcut studio on my dual gig g4 but now I want to work off my laptop and sell the dual gig g4. Only problem is that I have my finalcut studio disks buried in a big stack of boxes in preparation for a move. Is there a way I can transfer the programs to my laptop without haveing to dig in all these boxes for the install disks?
    Thanks

    You do not want to drag and drop - it does copy the program, sure. But it does not bring over over ALL the necessary components and frameworks needed to run. So it no worky.
    Solution - clone off the whole OS, programs, et al to an ext fw drive and boot off that.
    You'll want a pcmcia adapter to give you 2 buses so that one fw disc can hold the media and the other fw disc to hook into the built in bus.
    For the OS fw disc you'll find that using the fw 400 port is fine.

  • Can you Drag and Drop to open Files

    Hello All,
    I am trying to make a desktop app using AIR with Flash Pro CS5.5. I was wondering if it was possible to have the app open files by dropping them onto the app's icon in the browser of the OS.
    For example, let's say I want to create a photo viewer app for Windows. I would like to be able to highlight a couple of JPGs, drag them over my app's icon and 'drop' them into the program. This will open the app and it will show me the selected JPGs in a slide show.
    If this is not possible, then is it possible to have the app already open and drag the JPGs on the the open window for the same effect?
    I have read the FileReference and File classes documentation but it doesn't quite answer my question. Also, searches on Google as well as here don't seem to be leading me to the answer. I've tried "open file using drag and drop" and "pass a file as a parameter to AIR app" etc,  but the queries don't lead me to relevant information.
    Any help is appreciated,
    Thanks in advance.

    If you have an opened application you can drag and drop multiple images and these displays you (getting the path of the images and load with Loaders) this because I have done, but I'm not sure dragging over the icon works, maybe. 

  • Can you drag and drop contacts into Pages template?

    Older versions of Pages allowed you to drag and drop contact information to a document or template, Can this still be done in newer versions? If so, how?

    No.
    Someone has created an AppleScript to merge your addresses however.
    Why not just use Pages '09?
    Peter

  • Can you drag and drop folder names into Photos like iPhoto?

    I use to be able to drag folder of pictures into the sidebar of iPhoto and it would import the photos and put them in a folder with the exact name as the folder on my desktop. Photos does not seem to have th same feature. Does anyone know if this should be working?

    No because there are no Events in Photos.  A folder of images can be added to an album already in Photos.  But the photos will be located in the Moments that represent the date each photo was taken. 
    If you import a folder into Photos you can go to the Last Import smart album, select all of the photos there and create a new album with them in it.
    Moments in Photos are the new Events, i.e. groupings of photos sorted by date taken.
    When the iPhoto Library was first migrated to Photos there was a folder created in the sidebar titled iPhoto Events and all migrated iPhoto Events (which are now Moments) are represented by an album in that folder. To open the sidebar if it's not already open use the Option+Command+S key combination.
    There's a way to simulate events in Photos.
    When new photos are imported into the Photos library go to the Last Import smart album, select all the photos and use the File ➙ New Album menu option or use the key combination Command+N.  Name it as desired.  It will appear just above the iPhoto Events folder where you can drag it into the iPhoto Events folder
    When you click on the iPhoto Events folder you'll get a simulated iPhoto Events window.
    The downside to the simulation is that the Albums/Events can only be sorted automatically by Title. But they can also be sorted manually, either in the sidebar or in the folder's window at the right.
    Ask Apple for more sorting options in Photos and any missing features you'd like to see restored via https://www.apple.com/feedback/photos.html.

  • Some sites I can't drag and drop to the bookmark toolbar.

    My bank recently changed their login page so I had to update my bookmark for them.
    For some reason, when I drag the site icon onto the bookmark toolbar it doesn't add the site but instead puts a line with an arrow pointing down on top of it (almost looks like a Microsoft word editing markup).
    Some sites work fine, for instance I was able to drag cnn.com to my bookmark toolbar and it worked as expected.

    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem.
    *Switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance
    *Do NOT click the Reset button on the Safe Mode start window
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • Can you drag and drop MTS files into Final Cut Pro X 10.0.6?

    Just a simple question.. If not and i have to import, Ill just go back to After Effects

    Go back to After Effects.

  • Dragging and Dropping within iMovie '08

    I am new to iMovie '08. When I first started my project I was able to select a clip and drag directly from the events to the project library. However, now, when I try to drag, I just move the selection to another part of the event. I cannot drag and drop within the project either. Using Macbook trackpad to attempt drag and drop. Any help is appreciated.

    I can do this, but dragging and dropping like described in the manual would be a lot easier.
    Both methods work equally well for me. The usual problem with "Dragging and Dropping" is that the user is too impatient to wait for the segment clip index to be built before attempting to "drag" the segment to the Project window. By the time the segment is "built," the user has already released the "bundle" and it is too late for the application to detect the "active" drop area. You may notice that there is a slight delay between your segment selection/pressing the add button and the actual insertion of your clip segment. The delay is the same in both approaches, however, pressing the add button tells iMovie '08 where the segment is to be moved without the application having to detect an "active" area which may no longer be "active."

  • Can't drag and drop after update

    can't drag and drop after update

    hi Dustin, maybe with a bit more info someone will be able to help with this:
    what Mac OS System version are you using?
    what is it you are 'dragging and dropping'? : Is this drag and drop of text in InDesign? Or are you dragging and dropping from the Mac OS (e.g. a file from a folder) into InDesign?
    If you are referring to drag and drop from OS into InDesign: I'm thinking this 'might' be a Mac OSX issue. If you look over at https://discussions.apple.com/index.jspa there seem to be plenty of issues with drag and drop across different OS versions.
    Next time it stops working whilst you are in InDesign, does it still work in other programs? That is one way of determining if this is caused by InDesign or the operating system. If it is the OS, my guess is that it stops working in other applicaitons as well.
    Hope this helps,
    Cari
    twitter: carijansen
    facebook: carijansen.au

  • Can't drag and drop attachments into mail fullscreen

    Have a weird issue.  In lion I could drag and drog into a new mail message by dragging the attachment to the hot corner then to the fullscreen mail app then onto the new mail message.
    Now for some reason in Mt. Lion it will no longer do this.
    I can do it when mail is not in full screen mode or if I create a new mail message in another desktop.
    Any suggestions?
    And no I do not have air display on this computer (did do a search before posting)
    Thanks!

    When this happens can you drag and drop regular files and icons etc?
    I did a clean install, setup several user accounts last night. Dragging and dropping was working in my main user account last night. This morning (computer on all night) I could not drag and drop anything in that particular user account including mail attachements. Other accounts worked fine. Thought it was a permissions issue but they were fine.
    Ended up trashing the user account and resetting it up and everything back to normal.

  • Can't drag and drop attachments in mail. Major issue!

    I have to restart the computer to drag and drop attachments to an email. If I want to do another drag and drop to another email I have to restart again to make it work. It is a real pain. Do any of you guys know if their is a file I can trash to make this work or I have to wait till apple has a update to fix this? Thanks.

    When this happens can you drag and drop regular files and icons etc?
    I did a clean install, setup several user accounts last night. Dragging and dropping was working in my main user account last night. This morning (computer on all night) I could not drag and drop anything in that particular user account including mail attachements. Other accounts worked fine. Thought it was a permissions issue but they were fine.
    Ended up trashing the user account and resetting it up and everything back to normal.

Maybe you are looking for

  • Problem with job RDDEXECL (STMS)

    Hi Coleagues The problems is that  job RDDEXECL(Execution of programs for post - import processing) is canceled during execution. with the error: *What happened?     Error in ABAP application program.     The current ABAP program "SAPLPRGN_UTILITIES"

  • Vbund in general data selection ( report writer)

    Hi I wanted to add to general data selection in report field Trading Partner. I did following actions: 1. Created copy of library 1VK 2. Added to this copied library ( let's call it ZVJ) characteristic VBUND 3. In grr2 I inserted into ZVJ report 1SIP

  • Lightroom 64-bit has stopped working

    How do I fix this problem.  I was working in lightroom and all of a sudden I got this message. Please help!! Angie **If I have to uninstall and reinstall it - do I lose all the presets that I have added? Ugh!

  • Flar Image

    Our IT/CIS section made a .Flar backup (Image) of a SunFire V440 with OS 'Solaris 10 11/06 s10s_u3wos_10 SPARC' and want to port this image to a new M3000 server, but after the installation/setup and a final reboot it gives the next error: Rebooting

  • Settings for accounting doc for RA

    Hi , Request you to inform the settings made in IMG for creation of accounting documents at settlement (subsequent to RA) apart from OKG2.We have cases where accounting document is not being generated at settlement even if it is checked for ' Transfe