FLTK logo

Re: [fltk.general] Possible bug ? Fl_Browser_ Enter does not invoke callback function

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: Possible bug ? Fl_Browser_ Enter does not invoke callback function Albrecht Schlosser Sep 10, 2020  
 
On 9/10/20 4:43 PM w1hkj wrote:
   // must do shortcuts first or the scrollbar will get them...
*  if (event == FL_ENTER || event == FL_LEAVE) return 1;**

FL_ENTER and FL_LEAVE are events when the mouse enters and leaves the widget borders, resp.

*  if (event == FL_KEYBOARD && type() >= FL_HOLD_BROWSER) {
[...]
*      if (when() & FL_WHEN_ENTER_KEY) {**
**        set_changed();**
**        do_callback();**
**      }*

The line "if (event == FL_ENTER || event == FL_LEAVE) return 1;

prohibits the execution of the later do_callback when FL_WHEN_ENTER_KEY

This prevents using the FL_Enter key in a user callback.

That do_callback() is inside the condition 'if (event == FL_KEYBOARD ...)' which has nothing to do with the mouse move events mentioned above. I don't think this is a bug.

PS: it would have been helpful to mention the file and line and the FLTK version but I think I found it. TIA for the next time ;-)

--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/1b2893b2-639e-c93e-005f-4e4baa49ba4d%40online.de.
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'.