This is a migrated thread and some comments may be shown as answers.

Setting Disabled Style Toogle Button

1 Answer 146 Views
Button
This is a migrated thread and some comments may be shown as answers.
Michael O'Flaherty
Top achievements
Rank 2
Michael O'Flaherty asked on 12 Apr 2012, 07:51 PM

Hi!

We wrote an acsx control and everything seems to work well except for the disabled state. Is it possible to override the image when disabled? (See attached image.) This does not seem to work. It appears to use the enabled images and then sets the opacity.

Thanks!
Michael

.checkboxUnchecked
{
    background: #EBEFF3 url('/Images/CheckBoxUnchecked.png') no-repeat 0px 50% !important;
}
 
.checkboxChecked
{
    background: #EBEFF3 url('/Images/CheckBoxChecked.png') no-repeat 0px 50% !important;
}
 
/* not working */
.checkboxChecked.rbDisabled
{
    background: #EBEFF3 url('/Images/CheckBoxCheckedDisabled.png') no-repeat 0px 50% !important;
}
 
 
 
 
<div id="divCheckboxControls" style="display: inline-block; white-space: nowrap; margin: 2px; padding: 10px; ">
    <asp:Label ID="labelRequiredField" runat="server" text="*" cssclass="labelrequiredstyle" Visible="false" />
    <asp:Label ID="labelForCheckBox" runat="server" text="#" cssclass="labelstyle" />
    <asp:Label ID="labelForReadOnlyData" runat="server" cssclass="labelstylereadonly" Visible="false" EnableViewState="true"/>
    <telerik:RadButton ID="checkBox" runat="server" ToggleType="CheckBox" ButtonType="ToggleButton" AutoPostBack="false" CssClass="checkBox" DisabledButtonCssClass="checkBox" CausesValidation="false" EnableViewState="true">
        <ToggleStates>
            <telerik:RadButtonToggleState Text="." PrimaryIconCssClass="checkboxChecked"/>
            <telerik:RadButtonToggleState Text="." PrimaryIconCssClass="checkboxUnchecked"/>
        </ToggleStates>
    </telerik:RadButton>
</div>

1 Answer, 1 is accepted

Sort by
0
Jayesh Goyani
Top achievements
Rank 2
answered on 16 Apr 2012, 01:54 PM
Hello Michael,

Please check below code snippet.
<style type="text/css">
           .rbDisabled
           {
               opacity: 0.9 !important;
           }
           .rbDisabled .rbToggleCheckbox, .rbDisabled .rbToggleCheckboxChecked, .rbDisabled .rbToggleRadio, .rbDisabled .rbToggleRadioChecked, .rbDisabled .rbToggleCheckboxFilled
           {
               opacity: 0.9 !important;
           }
       </style>


Thanks,
Jayesh Goyani
Tags
Button
Asked by
Michael O'Flaherty
Top achievements
Rank 2
Answers by
Jayesh Goyani
Top achievements
Rank 2
Share this question
or