FLTK logo

[fltk.general] Fl_Check_Browser callback does not get called.

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 ]

Fl_Check_Browser callback does not get called. "aditya... Jun 13, 2021  
 
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());
}


--
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/43beb82b-bbb0-40b7-87bf-a8f0ce369984n%40googlegroups.com.
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'.