Hi Folks,
According to the manual entry for Fl_Button:
char Fl_Button::value() const
int Fl_Button::value(int)
The first form returns the current value (0 or 1). The second form
sets the current value.
Yet in this code, it appears to return NULL. Am I doing something
wrong?
// button_value.cpp
#include <iostream>
#include <FL/Fl.H>
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Button.H>
using namespace std;
Fl_Double_Window *win;
Fl_Button *but;
void but_cb(void)
{
cout << but->value() << endl;
}
int main()
{
win = new Fl_Double_Window(100, 100);
but = new Fl_Button(20, 40, 60, 20, "HIT ME");
but->labelsize(9);
but->callback((Fl_Callback*)but_cb);
win->show();
return(Fl::run());
}
// end of button_value.cpp
Thanks in advance,
Jonathan.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk