Hello,
I'm using this version of fltk: 2.0_pre6970 (got from Gentoo's portage)
I've got a strange behaviour when getting text lines from a browser widget.
I don't get the text of currently selected line in the browser, but i
get random lines (which belong too to the browser).
Here is the only way i've found to get the correct selected line:
(with fltk::Browser *browser pointing on a valid Browser class, of course)
int value = browser->value(); //get the number of selected line
browser->select(value); //go to the selected line (!!!)
fltk::Widget *selected = browser->item();
if (selected) {
fprintf(stderr,"selection: %s\n", selected->label() );
}
That seems a bit crazy, but if i don't use "browser->select" for
selecting the already selected line, the later
"(browser->item())->label()" won't return the correct line.
So it's working now, but i don't believe it's the best thing to do.
What do you think about that ?
Thank you.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk