imacarthur wrote:
> On 23 Dec 2008, at 7:16, Hakan wrote:
>> I added something in browser. And I`m trying to get all values of  
>> selected item in browser. How can I get values??
> 
> You are probably best starting off by looking at the browser demo in  
> the test folder, and then perhaps at Greg's tips here:
> http://www.seriss.com/people/erco/fltk/#Fl_Browser

        I believe in his first post he mentioned fltk 2.x.

        Afraid my cheat page doesn't cover 2.x.

        The browser is quite different in 2.x.. I don't know much
        about it, which is why I didn't answer.

        Looking at the 2.x docs, it seems the Browser inherits handling
        of the items in the browser from the Menu class.

        Since the Menu class manages the data, to get data out of
        the browser involves the same techniques as getting data
        out of the Menu class.

        So when you're looking at the browser documentation, note
        at the top it says 'inherits from fltk::Menu'.. click on that
        to see the Menu class docs, and use the methods there to walk
        the contents of the browser, eg. item()->label() to access the
        text of the browser items.

        See also the browser.cxx demo program; notice how it uses
        browser->item()->label() to access the selected item's text.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to