Drag and drop under Windows? 
Author Message
 Drag and drop under Windows?

Hi all,
I have written a program that has a feature where you can drag a row
from a listbox onto a canvas, where it is then drawn in the correct
location.
This works perfectly under OS X, but under windows it is not working
however. Could someone point out to me what I have to change to get
this working under windows?
Here is my code:
In the listbox, DragRow event:

Drag.AddItem(0,0,10,4)
Drag.Text=Me.Cell(row,1)
return True

Then in the canvas, open event:
me.acceptTextDrop

Canvas, dropObject event:
  'check if an item is selected in the listbox
  if infoWindow.infoList.ListIndex>-1 then  
    DrawLabel  ' This function handels the drawing of the label on the
canvas
  end if

I looked through the language reference, and as far as I can see I
avoided any Mac-only code. That is the reason why I don't understand
why it's not functioning properly under windows.
Thanks for any help, Jonck



Mon, 12 Dec 2005 21:59:16 GMT  
 Drag and drop under Windows?
Hi again,
It appears my windows troubles are more elaborate than I first
thought. My app works perfectly under OS X, has not crashed once.
However, under windows it is producing the following behavior (literal
text from a beta-tester of my program under windows):
"However, my problem is, that SOMviewer crashes quite often:
1 - it crashes systematically when double-clicking or right-clicking a
cell); the single-clicking of a cell opens the 2 windows without a
problem
2 - it crashes after ca 3 min. of running without any action"

With the double clicking or right clicking of a cell he is double
clicking or right clicking a canvas. I have not programmed for
anything to happen upon a right click (is there a possibility to
capture the right click event?). Double clicking does have some code
linked to it.

Does anyone have the same experiences with a program under windows?
Any suggestions how to make the windows version more stable? My app is
really quite simple, in a nutshell:
There is a main window displaying a canvas that users can click on to
gain information about the dataset that was used to create the picture
in the canvas.

I don't have any timers in my program, so the crash after 3 minutes of
inactivity is particularly unexplainable to me.

Does anyone have any helpful information for me?
Thanks very much, Jonck


Quote:
> Hi all,
> I have written a program that has a feature where you can drag a row
> from a listbox onto a canvas, where it is then drawn in the correct
> location.
> This works perfectly under OS X, but under windows it is not working
> however. Could someone point out to me what I have to change to get
> this working under windows?
> Here is my code:
> In the listbox, DragRow event:

> Drag.AddItem(0,0,10,4)
> Drag.Text=Me.Cell(row,1)
> return True

> Then in the canvas, open event:
> me.acceptTextDrop

> Canvas, dropObject event:
>   'check if an item is selected in the listbox
>   if infoWindow.infoList.ListIndex>-1 then  
>     DrawLabel  ' This function handels the drawing of the label on the
> canvas
>   end if

> I looked through the language reference, and as far as I can see I
> avoided any Mac-only code. That is the reason why I don't understand
> why it's not functioning properly under windows.
> Thanks for any help, Jonck



Tue, 13 Dec 2005 17:59:18 GMT  
 Drag and drop under Windows?


Quote:
> With the double clicking or right clicking of a cell he is double
> clicking or right clicking a canvas. I have not programmed for
> anything to happen upon a right click (is there a possibility to
> capture the right click event?). Double clicking does have some code
> linked to it.

To know if this is a right-click, use the function "IsCMMClick".

BTW: I have the same problem of drag and drop than you. Maybe an unsupported
Win32 function.



Tue, 13 Dec 2005 23:31:08 GMT  
 Drag and drop under Windows?
Hi Arnal,
Thanks for the IsCMMClick tip, very useful indeed :-) Too bad to hear
that you are also having problems with drag 'n drop under windows. I
guess it's now relatively safe to conclude that drag 'n drop is not
supported under windows. Might be nice if this was mentioned in the
language reference though.

I read on the web somewhere after an intensive googling session that
masks (and therefore transparency) for pictures are not supported for
windows compilations? Is this true? (might be that this was the case
in older versions of RB but that it's fixed now)
This would at least explain in part why some of the graphics that are
working perfectly under OS X are not showing up under windows.
What would be the workaround? I have three layers (pictures created
internally) that I'm drawing to the main canvas, and currently the
middle layer (this layer holds only text) is not showing up under
windows.

Thanks, Jonck

Quote:



> > With the double clicking or right clicking of a cell he is double
> > clicking or right clicking a canvas. I have not programmed for
> > anything to happen upon a right click (is there a possibility to
> > capture the right click event?). Double clicking does have some code
> > linked to it.

> To know if this is a right-click, use the function "IsCMMClick".

> BTW: I have the same problem of drag and drop than you. Maybe an unsupported
> Win32 function.



Wed, 14 Dec 2005 08:56:38 GMT  
 Drag and drop under Windows?
Hi,
   Not sure this is any help but I have definitely had both drag and
drop and picture transparency working under windows (98 using VPC) back
maybe to RB3.5 at least. With transparency make sure the picture depth
is 32 bit or it wont work (actually it may be lower but Im not sure what
the lower limit is).

HTH,

Peter



Quote:
> Hi Arnal,
> Thanks for the IsCMMClick tip, very useful indeed :-) Too bad to hear
> that you are also having problems with drag 'n drop under windows. I
> guess it's now relatively safe to conclude that drag 'n drop is not
> supported under windows. Might be nice if this was mentioned in the
> language reference though.

> I read on the web somewhere after an intensive googling session that
> masks (and therefore transparency) for pictures are not supported for
> windows compilations? Is this true? (might be that this was the case
> in older versions of RB but that it's fixed now)
> This would at least explain in part why some of the graphics that are
> working perfectly under OS X are not showing up under windows.
> What would be the workaround? I have three layers (pictures created
> internally) that I'm drawing to the main canvas, and currently the
> middle layer (this layer holds only text) is not showing up under
> windows.

> Thanks, Jonck





> > > With the double clicking or right clicking of a cell he is double
> > > clicking or right clicking a canvas. I have not programmed for
> > > anything to happen upon a right click (is there a possibility to
> > > capture the right click event?). Double clicking does have some code
> > > linked to it.

> > To know if this is a right-click, use the function "IsCMMClick".

> > BTW: I have the same problem of drag and drop than you. Maybe an
> > unsupported
> > Win32 function.



Wed, 14 Dec 2005 17:43:19 GMT  
 Drag and drop under Windows?


Quote:
> With transparency make sure the picture depth
> is 32 bit or it wont work (actually it may be lower but Im not sure what
> the lower limit is).

Is it a specific Windows limit or a realbasic-for-Windows limit?


Thu, 15 Dec 2005 22:55:32 GMT  
 Drag and drop under Windows?


Quote:


> > With transparency make sure the picture depth
> > is 32 bit or it wont work (actually it may be lower but Im not sure what
> > the lower limit is).

> Is it a specific Windows limit or a realbasic-for-Windows limit?

Sorry, I dont know.

Peter



Mon, 19 Dec 2005 05:51:43 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Drag and Drop in Windows with Explorer

2. Drag and drop on windows NT

3. blt8.0-unoff::drag&drop on windows

4. Can you drag and drop between windows?

5. How can I simulate Drag-n-Drop on Windows with win32com? (or TIFF-to-PCL)

6. Drag & Drop from MS-Windows

7. File Drag & Drop with Global Windows

8. Does Drag and Drop work with Windows?

9. Windows Drag-n-Drop in CW

10. Drag & Drop to Explorer under Windows 95

11. Drag-and-drop protocol for X Windows

12. Windows Drag/Drop to Taskbar?

 

 
Powered by phpBB® Forum Software