FLTK logo

Re: The Fl_Input drag and drop ?

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.general  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: The Fl_Input drag and drop ? Stan Oct 16, 2007  
 
> Is it possible to cancel the drag and drop mechanism (the small 'plus' sign) in an Fl_Input widget ?
> Is there a way to get a classical selection instead ?
>

I'm not sure exactly what you're referring to, but 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.  In
it, you can handle the KEYDOWN event, and learn what key was
pressed with Fl::event_key().   If you want the keystroke to
do nothing, just return 1 from handle() when you detect it.

Caveat:  event handling can be tricky. There have been helpful
examples in other threads in this forum that you'd do well to
have a look at.

HTH,
Stan
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.