Hiba schrieb:
> matthiasm told me
> In "Extra Code", enter something like
> o->data(index, (void*)"/usr/local/lib");
> In a callback, retreive them like this:
> const char *path = browser->data(index);
>
> Doing this, the comiler tells me that "index" is an undeclared identifier!!!!
> Where should i declare it?
Regarding to Fl_Browser "index" is ment as position of the entry you
want to read, valid values are "1" to pBrowser->size():
for (int index= 1; index <= pBrowser->size(); ++index)
{
const char* path= (const char*) browser->data(index);
}
Inside of a callback you normally want to get the index of the line that
was choosen in the browser:
if (int index= pBrowser->value())
{ // index contains value different from zero if line was choosen:
const char* path= (const char*) browser->data(index);
}
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk