DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Link: http://www.fltk.org/str.php?L2210
Version: 2.0-current


During draw() or callback, the pressed Button returns 0. The following code
is a modified callback function from tests/Button.cxx. Upon pressing the
button "Beep", it should change label to "1", and change it back to "0"
upon release. In my tests, it just goes to "0". This is probably because
pressing the button changes PUSHED flag, but value() returns STATE flag.
This is also different from FLTK 1.x (value() works correctly there) and
from FLTK 2.x documentation.

void beepcb(Widget *w, void *) {
  printf("\007"); fflush(stdout);
  Button* b = (Button*) w;
  if (b->value())
    b->label("1");
  else
    b->label("0");
}


Link: http://www.fltk.org/str.php?L2210
Version: 2.0-current

_______________________________________________
fltk-bugs mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-bugs

Reply via email to