On Sat, 08 Oct 2011 03:07:49 -0700, Albrecht Schlosser <[email protected]> wrote:
>> I am not getting any success getting a callback. >> >> Looking at Fl_Spinner.H and sb_cb in particular, I see the last >> statement is "sb->do_callback();" where sb is Fl_Group widget for the >> spinner. I have tried (I think) every combination for when() and I >> seem to be getting a rigid digit for my efforts. >> >> Am I barking mad or barking up the wrong tree? > >Usually we would ask you for some simple example code that shows >what you've done so far... However, I did a small example myself, and >it works well for me - w/o setting any when() condition, i.e. using >defaults. Please see appended example code, and if you have further >questions, please ask again. Albrecht Thanks for your response. It turns out that I made a stupid mistake that I could not find easily. All is still not well. When the value is edited via the keyboard the callback does not get called. The line in Fl_Sinner.H that reads input_.when(FL_WHEN_ENTER_KEY | FL_WHEN_RELEASE); needs to be changed to read input_.when(FL_WHEN_ENTER_KEY | FL_WHEN_RELEASE | FL_WHEN_CHANGED); Now the callback gets executed after a keyboard edit (as it should). _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

