Joseph wrote:
> Is there any way i can get the value of an input into a const char *.

        Fl_Input::value() returns a const char*:
        http://fltk.org/documentation.php/doc-1.1/Fl_Input.html#Fl_Input.value

> inp = new Fl_Input(10,10,100,30,"Your Name");
> butt->callback(newpart);
> where would gettin the value of inp be put into name?

        Try something like:

void newpart(Fl_Widget *w, void *userdata) {
     Fl_Input *in = (Fl_Input*)userdata;
     const char *name = in->value();            // get input's value() into 
'name'
     ..do stuff with 'name' here..
}

int main() {
     ..
     inp = new Fl_Input(10,10,100,30,"Your Name");
     butt->callback(newpart, (void*)inp);       // set callback, pass 'inp' as 
userdata
     ..
}
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to