Switching to DragReOrder system default?

  1. 5 days ago

    Arthur G

    Nov 8 Pre-Release Testers

    I have a listbox only containing text.
    The basic problem is when I drag to DragReOrder, the DropObject fires. (OF Course)
    I have enabled for a listbox both DragReOrder and DropObject events.
    That causes a problem when I want to ReOrder the rows, since the DropObject event is setup for importing text as opposed to Reordering rows.

    Is there one of the XOJO properties that I can use to get XOJO to allow the system default to happen?

    It would be nice if I could tell the DropObject
    If XXXXX Then return
    and it would just move the rows.

    Yes... test the drop object DragItem to see if it's a file you can read to import or a row that was picked up to reorder.
    I would argue this is a better solution as it relies on the framework to do more of the work.

    An example of how to figure out what was dropped can be found in the documentation.

    Edit: Oops, I did it again - it's a DragItem not a DropObject.

  2. Tim P

    Nov 8 Pre-Release Testers feedback://46303

    Test the Obj as DropObject in the DropObject event to find out if it's a file you can read to import or a row that was picked up to reorder.

  3. Arthur G

    Nov 8 Pre-Release Testers

    @Tim P Test the Obj as DropObject a row that was picked up to reorder.

    I do not see any property for this test. Both text and the row being moved have a 0 for a property, but that us not what you mean

  4. Tim P

    Nov 8 Pre-Release Testers feedback://46303

    I'm sorry, Obj in that event is going to be a DragItem, the signature I mentioned above was wrong.

  5. Arthur G

    Nov 8 Pre-Release Testers
    Edited 5 days ago

    What I did was add a property which had the sole function of being set by DragReorder and unset by Drop.
    Any alternative?

  6. Tim P

    Nov 8 Pre-Release Testers Answer feedback://46303
    Edited 5 days ago

    Yes... test the drop object DragItem to see if it's a file you can read to import or a row that was picked up to reorder.
    I would argue this is a better solution as it relies on the framework to do more of the work.

    An example of how to figure out what was dropped can be found in the documentation.

    Edit: Oops, I did it again - it's a DragItem not a DropObject.

  7. Tim H

    Nov 8 Pre-Release Testers Portland, OR USA

    I think Tim Parnell is referring to DragItem.FolderItemAvailable. If that's true, import the file. Otherwise return and allow the row reorder.

  8. Arthur G

    Nov 8 Pre-Release Testers

    I'm embarrassed to say I didn't have a True in the return for DragReOrder.
    It still went to DropObject, but it passed right on by.

or Sign Up to reply!