> On 27/05/11 12:28, anon wrote:
> > Hi!
> > I've been having trouble figuring out how exactly I'm supposed to fetch the 
> > filename/path string from said widget when my callback is invoked.
> > I have been looking through the relevant headers for FileBrowser and 
> > Browser classes and haven't succeded locating anything of interest.
> >
>
> Hi,
>
> Does the value() method not do what you're looking for? Inside the
> FileChooser's callback:
>
> void chooserCB(fltk::FileChooser* fc, void* v) {
>   // code goes here
>   puts(fc->value());
>   // more code goes here
> }
>
> Hope this helps!
> Ben

Thanks for the reply Ben. FYI I'm writing a barebone audio player.
I want to use FileBrowser and not FileChooser. While I admittedly haven't tried 
the latter I presume it is not meant to do what I want: have a directory 
browser in the left side of a window and when an item (directory) is selected, 
a Browser in the right side of the window shows a list of audio files that are 
contained in the selected directory.

But, if I've misunderstood the roles of the two XxxBrowsers, then I'm 
unavoidably led to wonder about the point of the FileBrowser; is the point to 
fetch the index of selected item which is then passed to some 
fltk::file_function() (I think, not sure, that I noticed some related functions 
in the doc) to fetch the actual string(s) ?
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to