realbasic-nug
[Top] [All Lists]

DropObject in Listbox

To: REALbasic Network Users Group <realbasic-nug at lists dot realsoftware dot com>
Subject: DropObject in Listbox
From: Brandon McWhirter <brandon-lists at tci-comp dot com>
Date: Sat, 29 Jun 2002 12:27:29 -0400
Hi everyone. I have been trying to get this DropObject event to work in the
Listbox and Window but everytime I drag a file to either the window or
listbox, it just bounces back. I am using RBfc1 and OS 10.1.5. I can't seem
to find any settings such as "AcceptDrop" or anything along those lines. My
script is below.

Sub DropObject(obj as DragItem)
  dim f as folderitem
  if obj.destination IsA folderItem then
    If obj.folderItemAvailable then
      Do
        f = obj.folderItem
        if f<>nil then
          if f.exists then
            listBox1.AddRow ""
            listbox1.cell(listBox1.ListCount-1, 1) = f.absolutePath
            listBox1.cell(listBox1.ListCount-1, 2) = GetLength(f)
            pushButton3.enabled = true
          end if
        end if
        f = nil
      Loop until not Obj.NextItem
    end if
  end if
End Sub

Any help?

-- 
Apple: Where Do You Want A Kernel Panic Today?

Brandon <brandon at tci-comp dot com>
TCI Computer Services



<Prev in Thread] Current Thread [Next in Thread>