Bug #423
closedWCheckBox, WRadioButton: fix enabling/disabling
0%
Description
From Thomas Kurz:
has anybody yet realized that since the recent (March 2010)
changes in WAbstractToggleButton::updateDomElements()
WCheckbox and WRadioButton elements can no longer be
disabled or set to readonly?
Only their label element will show up as disabled, because
"PropertyDisabled" and "PropertyReadOnly" are being cleared
on the input element itself after copying them to the
exterior element, which usually doesn't react on "disabled":
/*
Copy all properties to the exterior element, as they relate to
style,etc... We ignore here attributes, see WWebWidget: there seems not to
be attributes that sensibly need to be moved.
*/
if (&element != &input) {
element.setProperties(input.properties());
input.clearProperties();
}
If I remove the line containing the call to "clearProperties()"
it again works for me as expected.
Updated by Koen Deforche over 13 years ago
- Status changed from New to Resolved
You are entirely right. These properties need to be set on the form element itself.
Updated by Pieter Libin over 13 years ago
- Status changed from Resolved to Closed