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

Change button style on click.

1 Answer 129 Views
ToolBar
This is a migrated thread and some comments may be shown as answers.
Ivy
Top achievements
Rank 1
Ivy asked on 05 Mar 2013, 03:01 AM
Hi,

Is it possible to change the style of the RadToolBar button once it is clicked?

Thank you,
Ivy.

1 Answer, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 05 Mar 2013, 04:36 AM
Hello,

Yes, it is possible to change the item style when the mouse button is pressed using the ClickedCssClass property. Please have a look at the following code in which the style of the button is changed when it is clicked.

ASPX:
<telerik:RadToolBar ID="RadToolBar1" runat="server">
    <Items>
        <telerik:RadToolBarDropDown runat="server" Text="File">
            <Buttons>
                <telerik:RadToolBarButton runat="server" Text="New" ClickedCssClass="CustomClickedItem">
                </telerik:RadToolBarButton>
                <telerik:RadToolBarButton runat="server" Text="Open">
                </telerik:RadToolBarButton>
                <telerik:RadToolBarButton runat="server" Text="Exit">
                </telerik:RadToolBarButton>
            </Buttons>
        </telerik:RadToolBarDropDown>
    </Items>
</telerik:RadToolBar>

CSS:
<style type="text/css">
    .CustomClickedItem .rtbText
    {
        font-style: italic !important;
        color: Red !important;
    }
</style>

Thanks,
Princy.
Tags
ToolBar
Asked by
Ivy
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or