Hi, I'm using the fltk::browser to build a file explorer which by now successfully shows a directory's content including subdirectories.
When an item is clicked, I want to extract its path and thus need to traverse its parent items. In the callback method I receive the clicked item by: Widget* selected(browser->goto_index(browser->value())); The directory tree in the browser was build the following way: 1) Directories are added using add_group: Group* g(browser->add_group(line, &parent)); parent being the Group of the superior directory, proceeded recursively. Level 0 directories have browser as parent. 2) Files are added using: browser->add_leaf(line, &parent); Now calling selected->parent() it's always the browser being returned, no matter on which level the item was inserted. Likewise browser->current_level() always returns 0. I was hoping to use one of this methods for traversal. Is it a bug or am I doing something wrong? If this approach doesn't work for me, I cannot think of another way to determine which is the current path. Thanks for any advice. _______________________________________________ fltk-bugs mailing list fltk-bugs@easysw.com http://lists.easysw.com/mailman/listinfo/fltk-bugs