> I have tried running a program on my WindowsXP,the events work!So,maybe
> the sentence is wrong.But I still need to point out that the events work
> do not means it can work anywhere inside the window,if there is a widget
> inside the window and you drag a file into it and then release the
> file,our window won't be able to receive event FL_DND_RELEASE(event
> FL_DND_ENTER and FL_DND_DRAG work as well as the former case),thus it
> cannot receive event FL_PASTE and the event data.
> Now,I am trying to find a way out to solve the problem,I think maybe we
> can make the widget send an event message to its parent window and then
> our window can process the event.That's my raw idea,I need more time to
> make an attempt.If anybody who knows how to solve the problem,please tell
> me,thanks.


To be honest, what I usually do in that situation is subclass a widget from 
Fl_Box, that I set to have NO boxtype and no content (so is "invisible") and 
then in its handle method I arrange for it to pass on all events except the DnD 
ones...

I then place this "over" the entire main window, and over all the other 
widgets, and it handles all the drop events for everything. Other events pass 
through normally.

That appears to work and should alleviate the symptom you describe.

I'm not at all sure why I do it this way, it seems to be a pattern of some 
antiquity, so it may date back to a time when DnD didn't work so well and this 
was the only way?


SELEX Galileo Ltd
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 
3EL
A company registered in England & Wales.  Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************

_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to