On 11.06.2012, at 18:02, Richard Sanders wrote:

> On Mon, 11 Jun 2012 03:38:05 -0700, jseb <[email protected]>
> wrote:
> 
>> Hello,
>> 
>> I'm creating FLTK 1.3 GUI with Fluid.
>> 
>> I've added a Fl…Browser widget , and i'd like selecting lines using the 
>> mouse. According to the documentation, i should subclass Fl…Browser to 
>> Fl_Select_Browser.
>> 
>> How can i do this from inside Fluid ?
>> I've tried to replace «No Select» with «Select» in C++ tab of the widget 
>> property.
>> 
>> Here is what i get in .fl output file:
>> 
>>    Fl_Browser secondwin_browser {selected
>>      xywh {155 70 310 90} type Select
>>    }
>> 
>> 
>> It doesn't seem to be enough, and my widget is still of type 
>> «Fl_Browser», as you can see in generated code (fluid -c my.fl)
>> 
>>    { secondwin_browser = new Fl_Browser(155, 70, 310, 90);
>>      secondwin_browser->tooltip("secondwin_browser&&");
>>      secondwin_browser->type(1);
>>    } // Fl_Browser* secondwin_browser
> 
> 
> I just did the same yesterday and it does work. The key piece of code
> is " secondwin_browser->type(1);"

Ah, there is a simpler way. Double click on the widget to get the Widget 
Properties window. The click on the "C++" tab. The first entry is "Class:". At 
the right end of the line, there is a list of available classes for the widget 
that you choose. There should be an entry for the various browser types.

_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to