Drag and reposition a control

I tried to find a way to drag controls (i.e. imageView) around a page and that's what I come up with so far

            onTouch: {
                var iniX = 0;
                var iniY = 0;

                if (event.isDown()) {
                    iniX = event.windowX;
                    iniY = event.windowY;
                } else if (event.isMove()) {
                    myImage.translationX = event.windowX - iniX;
                    myImage.translationY = event.windowY - iniY;
                }
            }

However, this doesn't seem to work. I think there could be a mismatch of type for the myImage.Translation property, but I was not able to understand this. Any thoughts? Or maybe is there a better way to slide items?

All the move event is generated, you are reseting gwenael and iniY!

Create gwenael and iniY properties and put inside ' if (event.isDown ())'.

Tags: BlackBerry Developers

Similar Questions

  • Drag and Drop secondary control path

    In the attached .llb, there are two files, a master of VI with a secondary and a Subvi, which has control of trajectory:

    (picture attached)

    Is anyone else difficult to slip and fall in this trajectory control? I'm sure it's a bug. If this isn't a bug, I'd love to hear the wisdom behind the 'feature '.

    [this is where my post will be edited to understand the solution if found, or things that have been tried before. Misery loves company, but the success is a part]

    Search keywords:

    control of path, pathcontrol, #path #control

    Secondary, sup, #subpanel

    Drag / move, drag_and_drop #drag_and_drop

    Solved. The problem was not the operation drag / move, but secondary. See the code snippet.

    The Top level VI is running is not because the school is running...

  • Drag and drop parts of report

    Hi all
    Does anyone know where I could find a code example to drag and reposition a report after executing it? Our reports have many columns and to be able to drag them to the left or right would be fairly smooth. I can't find a sample.

    Thank you

    Hello

    To me it seems that you have a part of the comment of this jquery function

    $(document).ready(function(){
    // $("#draggable").draggable();
    

    Replace this Pentecost

         $(function() {
              $("#draggable").draggable();
         });
    

    change your report to any model model
    and the header of the region

    and the foot of the region

Here's how working example
http://Apex.Oracle.com/pls/OTN/f?p=40323:4

Published by: jarola on August 18, 2009 12:45 AM

  • How to drag and drop the < af:inputNumberSpinbox > in Control Panel

    Hello

    I use jdev 11.1.1.4.0

    I need the component as < af:inputNumberSpinbox >. Create a data model and how to drag and drop into the inputNumberSpinbox of the data control.
    normally drog and drop the individual attribute as inputText box only. I want to < af:inputNumberSpinbox >.

    anythig want to change in the indicators of control view object itself. Help me.

    Kind regards
    Marilyn S.

    Published by: rami on June 22, 2011 16:45

    Hello

    Cannot drop you as an inputText and then change to the source for inputNumberSpinbox?

    Kind regards
    Stijn.

  • Drag and Drop - target movie clip control

    Here's what I want to do.  Currently, I have a drag and drop built in AS 3, which works perfectly well, but I am looking to add one more feature.  What I want to do is when I let fall the correct item drag on its target correct piece, (which is a clip), I want my music video for target to go has a headframe.

    I'm so for example dragging a piece of paper on a clip from a waste basket.  When I drop the piece of paper on this topic to the trash, the trash clip moves one a headframe that appears a crumpled paper in it.

    Here is my current code for my drop eventlistener:

    function dropMe(event:MouseEvent):void
    {
    event.currentTarget.stopDrag ();

    If (Event.currentTarget.hitTestObject (Event.currentTarget._targetPiece))
    {
    event.currentTarget.x = 950;
    event.currentTarget.y = 100;
    event.currentTarget.removeEventListener (MouseEvent.MOUSE_DOWN, Drachma);
    event.currentTarget.buttonMode = false;

    }

    on the other
    {
    event.currentTarget.x = event.currentTarget._origX;
    event.currentTarget.y = event.currentTarget._origY;
    }
    }

    If event.currentTarget._targetPiece points to the instance of wastepaper basket, then I think you should be able to target just by using that...

    function dropMe(event:MouseEvent):void
    {
    event.currentTarget.stopDrag ();

    If (event.currentTarget.hitTestObject (event.currentTarget._targetPiece))
    {
    event.currentTarget.x = 950;
    event.currentTarget.y = 100;
    event.currentTarget.removeEventListener (MouseEvent.MOUSE_DOWN, Drachma);
    event.currentTarget.buttonMode = false;
    MovieClip (event.currentTarget._targetPiece) .gotoAndStop (2);
    }

    on the other
    {
    event.currentTarget.x = event.currentTarget._origX;
    event.currentTarget.y = event.currentTarget._origY;
    }
    }

  • Cannot resize firefox so I can drag and drop to create a shortcut

    I can't make my Firefox page smaller so I can drag and drop a web site to create a shortcut. I use windows 7. I have no flu when I point at the bottom right. When I use zoom the page itself re sizes but not the window. I just need to see a bit of my office, so I can create a shortcut.

    Hi limomitch, Firefox will remember the last 'normal' window size by saving in this file you deleted (which Firefox creates new). To switch between the normal and maximized window styles, you usually just double-click the title bar of the window, or you can use the middle (the one between minimize and close) button in the upper right corner.

    If you find that the 'normal' window size has increased too, and if the lower right corner is not visible, you can try Alt + SPACEBAR. It is a convention of Windows on the scale to display the window control menu. If the size is not gray, press arrow down once, then the up arrow key repeatedly until the lower edge of the window is in view. Repeat with the left if necessary and right keys. (If the size is dimmed, choose restore and that might be all you need).

  • upgrade to connected hp eprint - can't drag and drop apps to organize them the way I did before!

    I upgraded to connected HP eprint today.  Now it wont let me not to the eprint site (and, Yes, I would not have gone back if something did not work to connected hp).

    I could drag and drop placement of my apps to have as I would like on the touchscreen to eprint printer.   However, I can't do drag or drop whatever it is connected HP, and I see no help on the management of the investment of the apps on your printer.

    How is that possible?  It was easy before - printer just drag-and - drop and website updated.  I have an officejet 7610.

    Thanks in advance!

    Thanks for trying, but your answer is incorrect, according to an email I received today from HP connected:

    "I have reviewed your email. I understand you have questions related to the reorganization of the order of apps on the printer. I know this can be frustrating, and I want you to know you are certainly valuable for us and I want to do everything possible to ensure your complete satisfaction. The following information should provide the answers you need:

    (1) Unfortunately when HP has launched the new website (www.hpconnected.com) they do not include a method to rearrange applications on the printer. They can include this feature in a future update, but as this time it is not available.

    (2) If you did upgrade to connected HP eprintcenter, you do have the option of return. EPrintCenter is being be eliminated and retune to the old site unfortunately is not possible. »

    I hope that < < S-O-O-N > > HP fixed this new Web site - it's crazy take-out all controls like that from their customers and not embellish their or at least let them be.

    I can take this OJ 7610 back for a new brother 11 x 17 all-in-in-one - they look nice )

  • Drag and drop between screws

    I don't have much by using the drag and drop experience. I think using a tree control that appears in a sub VI with a list of channel names. I want to drag the name of the channel on an indicator on my main façade. There will be little code concerned after that to get the data of this channel in the indicator, which was chosen, but I don't know how to start the process of moving between the screws the Subvi with the tree control must have a structure of the event? Do I need a FG of operation between the two screws?

    Hi deskpilot,.

    Order the attached example. This should help you. Run the screw and try to drag in the drop-down list and drop into the VISA control

    Kind regards
    Amine31

    (Bravo to give good answers, mark it as a Solution If your problem is resolved)

  • 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.

  • Drag-and - drop but no files Sansa

    Well, I simply formatted and deleted the music that accompanies the "rocket" so that I can start with a slate clean to put only on the CD I have. I went to the Windows Media Player 11, which I had already downloaded previously in preparation to download all my CDs to see if I had Sansa here to see if I could drag & drop. There is no file Sansa. So, I then read the instructions on how to drag-and - drop. I opened Windows Explorer and was supposed to click on Sansa player before I clicked on the internal memory. But there is no Sansa file here or anywhere I looked. Is there another way of drag-and - drop? Just when I thought I had it under control... grrrrr! Thanks, Judy

    Well, now I feel better. I found an answer to my question. So until I have another question, I'll keep feeling. Judy

  • Just drag and drop them confirmation prompt? Accidentally move files.

    Since the upgrade to Windows 7, we had a problem with people who inadvertently move files by drag-and - drop when the meaning of double-click.  Is there a way to turn on a quick confirmation ("are you sure you want to... ") when drag / drop files/folders?  It seems that the previous versions of Windows had this prompt, but it has since been removed.  What is happening in our offices at least every week, sometimes every day, and we have to spend a lot of time searching for the moved folder.  If MS can't help, is there software that we can buy for this?

    Windows 7 has made no changes: there has never been a request for confirmation that you describe.

    One solution is to increase the distance you need to move the pointer before it triggers a drag.  Under the following registry key, you will see DragHeight and DragWidth, which define the number of pixels the mouse must move before the start of the operation drag is:
    Computer\HKEY_CURRENT\USER\Control Panel\Desktop
  • Can you "Disable drag and drop" in Windows 7?

    is there a method to DISABLE drag-and - déposer?

    Hello

    You need to carefully examine the results when you disable a base like the Drag and Drop feature.

    Some examples of functions that may be affected:

    • In many programs, you would be no longer able to drag and select a block of text to copy.
    • It would be impossible to drag a window to another location on the screen.
    • You cannot drag an icon on the desktop for the re - position.
    • In Windows 7, you would be no longer able to drag icons pinned in the taskbar for the re - position.
    • In other programs, you would not be able to drag the mouse to select multiple items.
    • With some third-party utilities that use the "sliders" to make adjustments, you wouldn't be is no longer able to drag the sliders.

    Most users want to disable drag and drop because they have accidentally drag and drop an element to an unknown destination.

    What you can do, without disabling completely the drag and drop functionality is to adjust the threshold to slide with a registry change. This will change the distance that an object must be moved before a drag is initiated.


    WARNING:
    always to the top of the resistry before making any changes. To do this in the registry editor, select file/export. In the scope of the export, all options you select. Save the file to the desktop. If something goes wrong, you can right click on this file to restore the registry.

    Press the button of the Windows Logo + R to bring up the run dialog box. Type regedit.exe in the Open box, and then click OK.

    Navigate to the following key.

    HKEY_CURRENT_USER\Control Panel\Desktop

    In the right pane, find the following.

    DragHeight and DragWidth. These two values will have a value of 4data.

    Right-click each of these values and select Edit.

    In the value data box, type 20.

    Click OK.

    You will need a Log Off/Log on to see the results.

    Test the new setting to see if it works for you. If 20 does not work for you, increase the value 30, etc., until you find the setting that your satisfaction with.

    Reset these values back to 4 returned it all back to the default value.

    Concerning

  • When I drag and drop a file, it creates a shortcut does not copy the file. I want to copy the file instead create shortcut.

    • Drag
    • drop
    • Drag / move
    • copy
    • short cut
    • create

    If you want to make a COPY of the file you drag (leaving the original where it is and make a copy in the place that you drop the file), and then hold down the control (Ctrl) key on your keyboard while you drag and drop, and she must make a copy in the new location.

    Hold down the ALT key should make a link/shortcut to the original.  Now does no key should MOVE the file from the original location to the new location.

  • Drag and Drop of printing in Windows 7

    1. drag and drop printing (i.e. parts dragging end droppping a file of the file on the printer icon Explorer) doesn't seem to work in Windows 7.

    2. maybe for the same reason, adding a shortcut to the printer in the SendTo folder (to add an item to send it to the printer in the right-click send to Menu) doesn't seem to work in Windows 7

    Is there a workaround for these 2 things?

    Hi Nalgupeba,
     
    Please note that this problem can occur if the printer drivers are not correctly installed on your computer.
     
    I recommend you to update the printer drivers and see if it makes a difference. You must be logged on as administrator to perform these steps.
     
    1. open Device Manager by clicking the Start button, click on the Control Panel, clicking system and Maintenance, and then clicking Device Manager. If you are prompted for an administrator password or a confirmation, type the assword or provide confirmation.
    2. in Device Manager, locate the device, and then double-click the device name.
    3. click Driver tab, then click on set to update driver and follow the instructions.
     
    Try to follow the link provided to update a hardware driver that is not working properly and check the question below.
    http://Windows.Microsoft.com/en-us/Windows7/update-a-driver-for-hardware-that-isn ' t-work correctly
     
    Thank you, and in what concerns:
    I. Suuresh Kumar-Microsoft Support.
    Visit our Microsoft answers feedback Forum and let us know what you think.
  • Enhancement request: improvement of Drag and Drop dashboards

    Hello

    I opened a ticket for this but I was told all requests for improvements have been conveyed by here now.  My end-users like foglight drag and drop dashboards and have created many custom edge tables specific to their groups or roles of the work.  I had a lot of requests for improvements to this feature a lot of them are cosmetic.

    Ability to control the fill color or the line color of data points.

    So that creating more of a host of table a still blue will overall of all charts.  Currently the colors match only if data points are added in the order of a chart to a chart

    Possibility to choose the maximum number on the axis Y

    Ability to set intervals on the axis Y (example: number 5, 10, 25, etc...)

    Possibility to set the threshold for a specific schema. (example: a red line to 80%)

    Ability points of label data manually with a label not in foglight (example: instead of the host name able to type in an application name)

    mivy00,

    Best thing to do is to enter the ideas section of the community where they can be read by all and voted.  I copy and paste is there for you, but it's better when it's a customer initiated entry.

    http://communities.quest.com/community/Foglight?view=idea

    Thank you

    Ken Barrette

  • Maybe you are looking for

    • Satellite C650D - a high utilization of the processor and the disk

      Hello Quite often get 'high 100% CPU usage' or "High use of the disc" message using IE9 or various other applications. Computer seems to work ok although slow do not very often. Scanned with Norton Internet Security 2011 and ok. Malware problem? Any

    • HP 15-af110nt: Windows 10 reset Boot Loop

      Reset Windows 10 has continued with a loop of starting for more than 15 hours. It keeps restarting, but the installation has not yet filled. What can I do to resolve this situation?

    • Fortunately the cRIO merger two time real screws: analog and digital output

      Howdy, I need help with a cRIO code.  The purpose of the code is to acquire an analog input from the NI 9234 c series module and be able to send a "signal of pulse" digital camera (first low for some time, t1, then high for some time, t2) from a NI94

    • Display "0000000B internal error."

      When you try to copy and paste on my windows xp system, I get this error message "internal error 0000000B" on my screen. I don't know what to do to fix this problem.

    • Burn recovery partition

      Really disappointed. I have a tm2-2050us that I really liked. Unfortunately, I tried to install Windows 8 on it. Although he had very few problems, and it worked. I decided that I didn't like the new operating system. I decided to return the netbook