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 ;-)
Comments are owned by the poster. All other content is copyright 1998-2025 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.