Stan wrote:
> ..how to change the type of a widget,
> rather than the name of its type (if that makes any sense).  For
> instance, you lay out a window with an Fl_Input in it, then
> decide to change it to something of your own derived from Fl_Group.
> 
> If such a feature exists, I too would love to know about it, as
> I often end up editing the .fl file by hand to accomplish this.

        If I know my widget is going to be based on Fl_Group,
        then I drop an Fl_Group in fluid, not the Fl_Input,
        and then change the Class:

        I guess if you've already dropped in Fl_Input first,
        and carefully tweaked all your attributes just so
        (custom colors, c++ code, callbacks) and later decide
        to replace the Fl_Input with a custom widget based on Fl_Group,
        yes, editing the .fl file is probably the way to go about it
        without having to make a new Fl_Group based widget, paste
        over all the tweaks, then delete the old widget.

        I'd probably do the latter for safety, and do the former
        only if there were many to change, in which case I'd work
        on a copy of the fl file, and then load/save in fluid, then
        xdiff the two files to make sure nothing was lost.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to