Xojo Conferences
XDCMay2019MiamiUSA

DragItem.PrivateRawData problem with DragReorderRows (Real Studio network user group Mailinglist archive)

Back to the thread list
Previous thread: Screen Saver affects processing?
Next thread: Getting the path to Unix tools in OSX


FolderItem--IsReadable   -   Claude Stone
  DragItem.PrivateRawData problem with DragReorderRows   -   Michael Diehr
   Re: DragItem.PrivateRawData problem with DragReorderRows   -   Michael Diehr

DragItem.PrivateRawData problem with DragReorderRows
Date: 29.07.08 01:16 (Mon, 28 Jul 2008 17:16:01 -0700)
From: Michael Diehr
I have a multi-line listbox with selectionType = multiple, and
enableDrag=True and enableDragReorder=true. I'm trying to deal with
the fact that when DragReorderRows is called, the rows haven't
actually been reordered, so it's not easy to deal with the data at
that time.

As a workaround, I thought I could handle this with an internal drag &
drop, but it's not working. A simple test:

ListBox1:
Function DragRow(drag As DragItem, row As Integer) As Boolean
drag.PrivateRawData("xxxx") = "drag test"
drag.text = "this is a test"
return true
End Function

Sub DropObject(obj As DragItem, action As Integer)
dim txt as string= obj.Text
dim pvt as string = obj.PrivateRawData("xxxx")

if pvt <> "" then
' internal drop
msgbox "this is an internal drop"
return
end if
End Sub

however, when I do the drag & drop, DropObject fires, but the DragItem
is empty: obj.PrivateRawData("xxxx") is blank, as is obj.text

Bug? or am I doing something wrong

2008R3.1

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: DragItem.PrivateRawData problem with DragReorderRows
Date: 29.07.08 01:17 (Mon, 28 Jul 2008 17:17:47 -0700)
From: Michael Diehr
Update: I've found that I can manually reorder the rows in the
DragReorderRows event (and return True to prevent RB from doing it)

This doesn't address the original issue of whether PrivateRawData is
broken, however.

On Jul 28, 2008, at 4:42 PM, Michael Diehr wrote:

> I have a multi-line listbox with selectionType = multiple, and
> enableDrag=True and enableDragReorder=true. I'm trying to deal
> with the fact that when DragReorderRows is called, the rows haven't
> actually been reordered, so it's not easy to deal with the data at
> that time.
>
> As a workaround, I thought I could handle this with an internal drag
> & drop, but it's not working. A simple test:
>
> ListBox1:
> Function DragRow(drag As DragItem, row As Integer) As Boolean
> drag.PrivateRawData("xxxx") = "drag test"
> drag.text = "this is a test"
> return true
> End Function
>
> Sub DropObject(obj As DragItem, action As Integer)
> dim txt as string= obj.Text
> dim pvt as string = obj.PrivateRawData("xxxx")
>
> if pvt <> "" then
> ' internal drop
> msgbox "this is an internal drop"
> return
> end if
> End Sub
>
> however, when I do the drag & drop, DropObject fires, but the
> DragItem is empty: obj.PrivateRawData("xxxx") is blank, as is
> obj.text
>
> Bug? or am I doing something wrong
>
> 2008R3.1

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>