Hi,
I have an Fl_Int_Input widget in my widget.
I have a default value in the value.
When the widget gains focus and the default
value is there I want to automagically clear
the value.
int Bin_Hex_Array::handle(int event) {
switch (event) {
case FL_PUSH: { // FL_FOCUS, FL_ENTER, ...
const char *str = this->input->value();
cout << "Focus on input thingy!\n";
if (strcmp(str, DEFAULT_VALUE) == 0) {
this->input->value("");
cout << "Clearning input default\n";
return 1;
}
}
} // end of switch
return Fl_Widget::handle(event); // standard event handler
}
Thanks,
/Ed
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk