SPONSORS:






User Tag List

Results 1 to 4 of 4
  1. #1
    Member
    Join Date
    Aug 2000
    Location
    Hyderabad,AP,India
    Posts
    80
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Drag and Drop in Applet...problem

    Hi Friends,

    Let me explain...

    I have got an java appivation ...like below..
    [-] window JavaMainWin DragAndDropLists
    [ ] tag "Drag and Drop Lists"

    in which there are two list boxes..like below..

    [-] JavaJFCListBox DNDList1
    [ ] tag "SourceList"
    [-] JavaJFCListBox DNDList2
    [ ] tag "TargetList"

    now I want to drag an item from one list and drop into other....

    I am getting problems while doing it with BeginDrag and EndDrag...

    It drags in the same list and drops at the same....

    Please help me....


    ------------------

  2. #2
    Senior Member
    Join Date
    Jan 2001
    Posts
    750
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Drag and Drop in Applet...problem

    paste your code that drag and drop please.

    You could have done something wrong there.

    I believe your have to match BeginDrag and EndDrag. The window reference calling these functions can be different.

    If this fails try to use DragEndAt() which uses a coordinate to where to drop the object.

    ------------------


    [This message has been edited by GodKnows (edited 06-06-2001).]

  3. #3
    Member
    Join Date
    Aug 2000
    Location
    Hyderabad,AP,India
    Posts
    80
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Drag and Drop in Applet...problem

    [-] testcase test () appstate none
    [ ] DragAndDropLists.Invoke ()
    [ ] DragAndDropLists.SetActive ()
    [ ] DragAndDropLists.DNDList2.BeginDrag (1,"Target Item4")
    [ ] DragAndDropLists.DNDList1.EndDrag ("Source Item2")


    ------------------

  4. #4
    Senior Member
    Join Date
    Jul 1999
    Location
    Bellingham, WA USA
    Posts
    1,323
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Drag and Drop in Applet...problem

    Baseer,

    Man!!! I'm so with you on this one. I have had the exact same problem! Logged it as a failure with Segue. Here is what my situation looked like and what I did about. I have one JavaJFCTreeView from which I select a branch of the tree to drag. I am going to drop it on another JavaJFCTreeView, but the trick is, this is the FIRST item in that tree.

    If you look in the docs, it is required that EndDrag be dropped ON something. Since my branch to be dropped is the first item in the tree, there is nothing on which to drop it. I had to resort to an EndDragAt() which unfortunately requires coordinates.

    So, I called RECT on the JFCTreeView panel I wanted to drop this on and added something like 20-25 pixels to both the x and the y of that so I knew I'd be somewhere in the upper left corner of the thing and did an EndDragAt() on those coordinates.

    Hope this helps!

    ------------------

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 05:50 AM.

Copyright BetaSoft Inc.