I’d like to add drag’n’drop capabilities to a FOX GUI. Can anyone point me at an example of this?
I did a quick search through all the sample source, but didn’t find anything helpful.
Thanks in advance,
Harry O.
I’d like to add drag’n’drop capabilities to a FOX GUI. Can anyone point me at an example of this?
I did a quick search through all the sample source, but didn’t find anything helpful.
Thanks in advance,
Harry O.
Harry Ohlsen wrote:
I’d like to add drag’n’drop capabilities to a FOX GUI. Can anyone point
me at an example of this?
I should point out that this is under Windows, just in case that makes a difference.
One further clarification … what I want to be able to do is to drag files from the Windows Explorer onto my application and have it detect that file path and open it.
By looking at the documentation for the FOX tooolkit itself, I’ve guessed that I can call FXWIndow::dragEnable and then connect to SEL_DND_* events. However, having done the dragEnable, when I drag a file from Explorer, it gives me the “Don’t you try and drop that thing here!” icon when I’m over my GUI’s window :-(.
Is it simply that one can only drag’n’drop between two FOX GUIs, or have I simply not written enough code yet?
By looking at the documentation for the FOX tooolkit itself, I’ve guessed
that I can callFXWIndow::dragEnable and then connect to SEL_DND_* events. However,
having
done the dragEnable, when I drag a file from Explorer, it gives me the
“Don’t you try and
drop that thing here!” icon when I’m over my GUI’s window :-(.Is it simply that one can only drag’n’drop between two FOX GUIs, or have
I simply not
written enough code yet?
I’d guess that this second thing is the case, since in Windows (Win32 API,
MFC, even .NET WinForms) programming, once you do an equivalent of
dragEnable, you are afterwards notified that “dragging is happening” +
cursor location and other info, and then you’re supposed to decide what to
do about it in your handler, which also comprises changing the icon, etc.,
because for instance you might decide that not every physical point in your
app is an acceptable drag and drop point, or similar. I suppose that one can
safely assume that FOX drag and drop handling doesn’t deviate from that.
Regards,
M.