B4J Question Get TreeItem using X, Y co-ords for Drag'n'Drop

Discussion in 'B4J Questions' started by zyblux, Feb 10, 2015.

  1. zyblux

    zyblux Member Licensed User

    Hi,
    Can you get the treeitem under the mouse pointer using the X,Y values from the mouse events?

    I'm using the dragdrop library which is really good but having problems dragging from a TableView to a TreeView. It all WORKS fine if I just want to drop anywhere in the treeview and use whatever the selected treeview item is. But I'd like to drop onto a specfic treeitem under the mouse pointer (not just the selected one).

    In VB.NET you had GetNodeAt(X,Y) but I can't find a similiar method in JavaFx. I found this article which refers to impl_picknode but I can't get it working with Reflection (method not found or not matched?) :(

    Any ideas? I'm new to B4J and I don't Java.
    Thanks
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Can you post a link to this article?
     
  3. zyblux

    zyblux Member Licensed User

  4. Erel

    Erel Administrator Staff Member Licensed User

    This is what the internal documentation of this method say:
    /**
    * Finds a top-most child node that contains the given coordinates.
    *
    * Returns the picked node, null if no such node was found.
    * @treatAsPrivate implementation detail
    * @deprecated This is an internal API that is not intended for use and will be removed in the next version
    */

    Doesn't look like it should be used.
     
  5. zyblux

    zyblux Member Licensed User

    Aw, that's a shame. Nevermind, thanks very much for checking for me.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice