Stan wrote:
>I'm not sure exactly what you're referring to,

Fl_Input widget allows you to drag the selected text and to drop it somewhere 
else in the widget or in an other Fl_Input widget. It's very handy but I don't 
need it at all in my app.

> it sounds like you want to make a subclass of Fl_Input and implement >its 
> handle() method to do whatever it is you want done.

Yes, that's what I did.

I noticed that the use of cut() insert()  or replace() function cancel this dnd 
mechanism.
So the trick is to use the replace function without altered the value.

 case FL_PUSH:

  if(mark() != position())
  {
   char first = index(0); //Retrieves the first charactere of the value
   const char* pFirst = &first;
   replace(0, 1, pFirst, 1); //and replace it with...itself
  }

I know it looks twisted but so far it's the only way I found to get a
classical selection in an Fl_Input widget.



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

Reply via email to