Allan Rae wrote:
> On Fri, 27 Sep 2002, Rob Lahaye wrote:
> [...]
> 
>>Why does this function only work on check and button widgets?
>>When I do, for example:
>>
>>      bc().addReadOnly(dialog_->choice_width_unit)
>>
>>the choice widget is not disabled for a readonly document!
>>
>>Does this function only apply to a limited set of Xforms widgets?
>>If so, why?
> 
> 
> We call fl_activate and fl_deactivate functions with the FL_OBJECT so
> if some widget isn't deactivated then it's an XForms bug (or
> limitation or feature).

This cannot be the reason.

fl_activate and fl_deactivate work fine on any widgets in Xforms.
In fact, they are wrapped up in the LyX function

    setEnabled(FL_OBJECT *obj, bool enable)

that has no problems at all.

The addReadOnly must be the culprit, but I can't see why and how. I can
trace it no further than into frontends/controllers/ButtonController.h

27: template <class Button, class Widget>
28: class GuiBC : public ButtonControllerBase
29: {
[...]
43:     void addReadOnly(Widget * obj) { read_only_.push_back(obj); }
[...]

and then I'm lost.

Why does this work only for push-buttons and check-buttons, but not for
other Xforms widgets (choice-lists, input fields etc.) ?

If this is a feature/bug, it's a LyX implemented feature/bug!

Regards,
Rob.

Reply via email to