aditya...@gmail.com
unread,Jun 13, 2021, 12:17:21 PM6/13/21Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to fltk.general
Hi,
It seems like `Fl_Check_Browser`'s callback doesn't get called when items are selected and deselected. I tried the example program compiled with the last FLTK commit (#986a8b33a2b5e503dd36ddbc8283d489ebbd9290) below with both keyboard and mouse input:
#include <stdio.h>
#include <FL/Fl.H>
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Check_Browser.H>
void CB(Fl_Widget*, void *) {
puts("In the callback");
}
int main(int argc, char *argv[]) {
Fl::scheme("gtk+");
Fl_Double_Window *win = new Fl_Double_Window(250, 120, "Simple Browser");
win->begin();
{
{
Fl_Check_Browser *brow = new Fl_Check_Browser(10, 10, win->w()-20, 80, "Check");
brow->callback(CB);
brow->add("Aaa");
brow->add("Bbb");
brow->add("Ccc");
brow->add("Ddd");
brow->checked(1,1);
brow->checked(2,1);
}
}
win->end();
win->resizable(win);
win->show(argc, argv);
return(Fl::run());
}