Drag and drop the image in 2d image

Hi all

I am trying to apply a little magic "MS paint" for dialogue of the customer. I want to be able to drag and drop into a 2d image control. Ideally, I wish I could it move and resize once it is there, but let's start with the first part - how to do drag and drop of for example the Office on the 2d image control. The rest is nice-to-have but not necessary.

I saw a smart example on here by using a transparent control of path, but will not cut here (I have other events related to this area of the image, for example right now, I have a double-click event, add text to the image).

Thanks for all the ideas... I looked briefly using the API (i.e. nodes Builder) windows but it having the dragons.

It is not terribly difficult to get these events with the picturebox. You just register for events like I did with the dragdrop event, can it treat appropriately in the structure of your event.

Tags: NI Software

Similar Questions

  • Drag and drop the Image

    I'm trying to drag icons of half right of my screen on an image about half left. My code is below, and I don't know why nothing happens

                            var forward:Image = new Image();
                forward.setImage("assets/forward.png");
                forward.setPosition(883,120);
                forward.addEventListener(MouseEvent.MOUSE_DOWN, drag);
                forward.addEventListener(MouseEvent.MOUSE_UP, drop);
                icons.addChild(forward);
    
    private function drag (e:MouseEvent):void{
                forward.startDrag(false, new Rectangle(5,115,813,390));
            }
            private function drop (e:MouseEvent):void{
                forward.stopDrag();
            }
    

    Now, I also have several icons (small pictures) it will drag (for example, 5 of each). If I have sex with each other and use this.startdrag I am able to apply the same event listener for each of them? Or will it take a separate event for each icon (small picture) listener?

    Thank you!

    Hey jffurian,

    to give you an idea of how it should look like, here's what I have:

    ImageTest.as:

    package{    import flash.display.Bitmap;    import flash.display.Shape;    import flash.display.Sprite;    import flash.events.Event;    import flash.events.MouseEvent;    import flash.geom.Rectangle;
    
        import qnx.ui.core.Container;    import qnx.ui.core.ContainerAlign;    import qnx.ui.core.ContainerFlow;    import qnx.ui.display.Image;
    
        [SWF(width="1024", height="600", backgroundColor="#CCCCCC", frameRate="30")]    public class ImageTest extends Sprite    {            [Embed(source="assets/forward.png")]        private var forward:Class;
    
            private var mainContainer:Container;
    
            private var containerMargin:int = 10;        private var myImage:Image;        private var bitmap:Bitmap;
    
            public function ImageTest()        {            super();
    
                mainContainer = new Container();            mainContainer.margins = Vector.([containerMargin,containerMargin,containerMargin,containerMargin]);            mainContainer.flow = ContainerFlow.VERTICAL;            mainContainer.align = ContainerAlign.NEAR;
    
                bitmap = new forward();
    
                myImage = new Image();            myImage.setImage(bitmap);
    
                myImage.addEventListener(MouseEvent.MOUSE_DOWN, doDrag);
    
                mainContainer.addChild(myImage);
    
                mainContainer.setSize(400, 500);            mainContainer.setPosition((stage.stageWidth / 2 ) - (mainContainer.width / 2), (stage.stageHeight / 2 ) - (mainContainer.height / 2));
    
                addChild(mainContainer);
    
            }
    
            private function doDrag(e:MouseEvent):void        {            myImage.removeEventListener(MouseEvent.MOUSE_DOWN, doDrag);            myImage.addEventListener(MouseEvent.MOUSE_UP, noDrag);
    
                myImage.startDrag();        }
    
            private function noDrag(e:MouseEvent):void        {            myImage.removeEventListener(MouseEvent.MOUSE_UP, noDrag);            myImage.addEventListener(MouseEvent.MOUSE_DOWN, doDrag);
    
                myImage.stopDrag();
    
            }    }}
    

    If you can spot the differences lemme know. Good luck!

  • Drag and drop the Image sequence number

    Hello

    IM bad having to drag / drop a folder of image sequence. Folder hangs out perfectly and the window further emphasizes, but nothing happens. However when I go to FILE and IMPORT I success bringing in the sequence of images as a model.

    This problem is resolved by update fixes after effects CC (12.2.1), which is now available:

    http://Adobe.LY/AE_CC_1221

    Note the part at the end of this page on a crucial update for the creative cloud desktop application, which addresses serious problems with the SOUL, first Pro and After Effects.

  • Why creates shortcuts for Moving files when drag and drop the folder or file in another folder?

    I am using Windows XP SP3, just before I drag and drop the file into another folder in my windows explore. Suddenly, he is creating shortcuts for moving file. I'm not able to move the file by drag / move the mouse, it is possible that by cutting and Paste(Ctrl+X) using the keyboard. Why?

    Maybe your 'Alt' key is stuck.
    See exchanging the keyboard with another makes all the difference.

    HTH,
    JW

  • I've lost the ability to copy files on my CD player. When I drag and drop, the only authorized action is 'move' and it does not work.

    I've lost the ability to copy files on my CD player.  When I drag and drop, the only authorized action is 'move' and it does not work.   I tried press and hold the CTRL key while dragging, and when I do that all the other disks show "copy" as the default action, but when I hover over the action CD player available only changes to 'pass '.   I ran the Microsoft Troubleshooting tool for CD/DVD players and he said that the media were not writable, but there is a blank CD in the drive.  Any ideas on how to solve this problem?

    Thanks, but the cd/dvd drive works well - I can burn a cd with windows media player for example.  the problem is that I can't copy files to it.   I can play CDs (haven't checked the DVD).  I can not do and could do before, is doing drag and drop files on it.  The only authorized action is "move".   This happens even when I click CTRL + do drag.   I can copy it to any other player, but the CD player, and when I hover over the "exemplary" drive CD goes to 'move '.

    have you tried using a different suite of cd/dvd burning?

    Imageburn is free and easy to use: http://download.imgburn.com/SetupImgBurn_2.5.7.0.exe

    There may be something to play with your access keys if you have a (ie., wirekeys)

  • Drag and drop the game - add your comments

    Hello

    I created drag and drop the game:

    If the player, drag the object to the correct target - snapping to the target, else it returns to the original location.

    My question:

    I want to add sound (such as feedback) when hanging to the right target.

    What should I write in the code?

    Help, please

    Thank you (-):

    (I added the code and the printscreen)

    star.addEventListener (MouseEvent.MOUSE_DOWN, fl_ClickToDrag);

    function fl_ClickToDrag(event:MouseEvent):void

    {

    star.startDrag ();

    }

    stage.addEventListener (MouseEvent.MOUSE_UP, fl_ReleaseToDrop);

    function fl_ReleaseToDrop(event:MouseEvent):void

    {

    If (star.hitTestPoint (targetstar.x, targetstar.y))

    {

    Star.x = targetstar.x;

    Star.y = targetstar.y;

    }

    else {}

    Star.x = 692;

    Star.y = 232;

    }

    star.stopDrag ();

    }

    square.addEventListener (MouseEvent.MOUSE_DOWN, fl_ClickToDrag_2);

    function fl_ClickToDrag_2(event:MouseEvent):void

    {

    square.startDrag ();

    }

    stage.addEventListener (MouseEvent.MOUSE_UP, fl_ReleaseToDrop_2);

    function fl_ReleaseToDrop_2(event:MouseEvent):void

    {

    If (square.hitTestPoint (targetsquare.x, targetsquare.y))

    {

    Square.x = targetsquare.x;

    Square.y = targetsquare.y;

    }

    else {}

    Square.x = 122;

    Square.y = 266;

    }

    square.stopDrag ();

    }

    create your sound (using the new construction), then apply the play() method to make the sound when your hitTestPoint is real.

  • codesnippent createjs equivalent of flash as3 drag and drop the code snippet

    AS3 deafult code snippent for drag and drop

    circle.addEventListener (MouseEvent.MOUSE_DOWN, fl_ClickToDrag_3);

    function fl_ClickToDrag_3(event:MouseEvent):void

    {

    circle.startDrag ();

    }

    stage.addEventListener (MouseEvent.MOUSE_UP, fl_ReleaseToDrop_3);

    function fl_ReleaseToDrop_3(event:MouseEvent):void

    {

    circle.stopDrag ();

    }

    I just tried to convert this code createjs. but my code does not

    / * js

    var t1 = this;

    {circle.addEventListener ('mousedown', function (e)}

    {stage.addEventListener ('stagemousemove', function (e)}

    T1.x = stage.mouseX;

    T2.y = stage.mouseY;

    });

    {stage.addEventListener ('stagemouseup', function (e)}

    e.target.removeAllEventListeners ();

    });

    });

    */

    are you trying to drag and drop the circle?  If so,.

    var tl = this;

    tl.circle.addEventListener ("mousedown", downF)

    function downF (e) {}

    stage.addEventListener ('stagemousemove', moveF);

    stage.addEventListener ('stagemouseup', upF);

    };

    function upF (e) {}

    stage.removeAllEventListeners ();

    }

    function moveF (e) {}

    TL. Circle.x = stage.mouseX;

    TL. Circle.y = stage.mouseY;

    }

  • With the help of Hewlett Packard Win 7 64 bit with Lightroom 5.7. I have read many explanations of how to drag and drop digital images in Lightroom - but I never got.  I need to know WHERE LTRM drop, HOW to find them and how to get them I

    I need to know EXACTLY how to drag and drop digital pictures into LTRM. WHERE to put them. HOW to find them. How to MOVE in the DEVELOPMENT MODULE.

    When you drag / drop photos, you actually perform a step to import, so it would be wise to figure out how to import your photos and all of the affected options. I agree with Jim Hess and al., drag / drop are an easy way to screw up your organization. Importing is a much more organized way to manage things. There are a lot of tutorial vid3os on import.

  • Drag and drop the text on the target

    I am changing a drag and drop interaction in Captivate 9 included in a Starter of course downloaded from the e learning brothers. I've renamed the source text, but when it reaches the correct destination, he returned to the original text "Answer 1". Where can I change the text of the button when it is properly recognized destination.

    Please see the icons present tutorial in the Captivate welcome screen.

    Image attached for reference.

    Click on the computer icon and you can find examples of projects and tutorials of every new feature implemented.

    Thank you

    Derrick

  • I would like to be able to drag and drop the names of folders to categorize.

    With Thunderbird, folders currently appear in the order they are created. I'd like to be able to drag and drop to a new location so my frequently used address is near the beginning and those less-used at the end. Tyty

    No problem. Add on even made records and accounts.

  • I want out emails in folders of ordinary files, but when I drag-and-drop, the "modification date" gets changed. How I can still see the date?

    To archive my e-mail files until I decided to switch to Thunderbird, I create regular folders in windows and drag and drop emails to outlook express in the appropriate folders. The "update" column displays the original date of the email... which is what I want to do with Thunderbird. In my view, that he treats it as a new file created today... that is not good for my archiving system of these professional work files that I need to find often in approximate date.

    I understand the forum that it is by default in Thunderbird. There is an add-on that can do what I'm doing?

    Thank you in advance,
    Netwon

    I think the reason what OE is the original date because each message is stored in a single file, while TB stores all messages in a folder in a file, an mbox file. Thus, when you save a message as a single eml file, its 'modification date' corresponds to the eml file date was written in the mbox file.

    You can find the ImportExportTools add-on useful because it allows you to add the date of the e-mail eml file name when enamel is exported ("Save selected messages" of the message right-click menu).

  • Cannot drag and drop the eamils in Hotmail.

    Hello

    I opened Hotmail today but cannot drag and drop emails as usual. I am still able to open and read them, but I cannot move them to other folders unless I have use the checkboxes and ' move to ' drop-down menu.

    Hotmail is truncated normally works with Internet Explorer, so it must be a matter of Hotmail. I tried to delete the cache and cookies of Hotmail (as least I think they were witnesses of Hotmail).

    Any help would be greatly appreciated!

    It seems to work in Firefox. I think it was on the side of Microsoft.

  • How can I make use of TC partitions and make sure that the file analysis is on the right partition?  I do not see the partitions that I have done in the Finder, but I can drag and drop the files in the folder 'Data' unique under Finder/Shared/TC.

    MacBook Air, OSX 10.10.3, 128 GB; 2 TB Time Capsule ME177LL/A.

    Final objective: use Time Capsule as a Time Machine for my MacBook Air and as a storage solution for large files that I don't want permanently on my MacBook Air.

    So far, I've implemented the TC and set up Time Machine on the TC.  I was able to create 2 partitions on the TC using disk utility then that TM was a backup and the disk was recognizable in disk utility.

    Under Finder/shared, I see the TimeCapsule 'airport', and when I click on it it is a file called "Data".  I was expecting to see my two partitions here.  Under 'Features' is a ' Zissou31 MacBook Air (3)"sparsebundle file and I can also create folders here and drag and drop files on the TC here.  I can see the partitions in disk utility, but how do I see/use the partitions I created in the Finder?

    I fear that this may not be set up correctly and I'm either losing on an entire partition I created or these files dragged/dropped may be at risk of overwriting of TimeMachine.  How can I make sure that the file analysis is on the appropriate partition?

    I disabled TimeMachine and go back to see if I could 'point' to one of the partitions, but the "Data" folder is the only thing that TimeMachine seen.  How do I point time Machine for one of the partitions?

    Thank you!

    In addition, in disk utility, I can see one of the partitions TC is related to the time Machine, indicated by the icon Time Machine green bottom left, but two partitions seem to fall under "Zissou31 of the MacBook Air (3) .sparsebundle.

  • Drag and drop the models of the range of functions

    I really like how can I drag and drop a States JKI Machine in range of my service on a block diagram.  Instead of placing a Subvi on black chart, the code in the template is placed on the block diagram.  How can I get my own templates for this?

    I have just learned about this and put in place with a few VI.

    This should happen to you. TST is pointed out that, in the first post, he called VI merge, but got renamed to pour into VI, LV 8.5

  • Drag and drop the element of the array of Clusters

    I have a project that includes an array of 'tests', each of which is a cluster that contains an array of 'numbers', a matching the regular expression string and an array of "tasks" (all of them, is in turn, a group of elements).

    It is:

    • Tests (table of):
      • Cluster:
        • Reference numbers (an array of strings)
        • Regex (string)
        • Tasks (table of):
          • Cluster:
            • Task type
            • Basic channel,
            • Measuring channel
            • Other channels

    I wish I could drag and drop to rearrange the task table in an individual event.  (It is a nice-to-have rather than a urgent request - more for my own learning that no matter what).  For now, I've implemented "Move up" and "Move down" buttons

    Examples are fine for a single cluster that includes a table or an array of objects.  As soon as we have an array of clusters, it is difficult to access individual items within a specific cluster.

    Who that it be completed can drag and drop into such a facility?

    Curiously,.

    Geoff

    Hello GeoffF,

    It's certainly doable and you can even use the standard start drag and drop methods/events, the trickiest part is to determine the table of the elements that are selected on the mouse towards the top/mouse downwards and the swap of manual handling.  Fortunately, there are a few decent examples of how do this out there already, I suggest you take a look at this one:

    Example of community: determine the Index of the clicked element Array in LabVIEW

    https://decibel.NI.com/content/docs/doc-22434

    That should give you the selected table indexes, and then all you have to do is to move the elements around around the drop event.  I have attached a very basic demonstrative example that uses this code I just linked (you need to download that as well) and the events referred to swap two elements of the array.   The attached code is just thrown together, you'll want to design something more robust and scalable to any sort of actual use.

    Kind regards

Maybe you are looking for