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

A different image OnHover for Checked/Unchecked buttons

2 Answers 44 Views
ToolBar
This is a migrated thread and some comments may be shown as answers.
Nicolas
Top achievements
Rank 1
Nicolas asked on 19 Aug 2009, 08:58 AM
Hi,

using the latest RadToolBar, I could not find a way or an example demonstrating how to have a HoveredImageUrl different for a checked button than for an unchecked button. Basically what I would have expected is a "CheckedHoveredImageUrl" property.

Is there any easy way to have that behavior on the toolbar buttons?

ps: I'm not going server-side on button clicks, only some js gets executed.

Thanks

2 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 21 Aug 2009, 01:18 PM
Hi Nicolas,

I suggest you subscribe to OnClientCheckedStateChanged event of RadToolBar and in its handler:

function checkedStateChanged(sender, args) 
    if(args.get_item().get_checked()) 
        args.get_item().set_hoveredImageUrl("[checkedHoveredImage]"); 
    else 
        args.get_item().set_hoveredImageUrl("[normalHoveredImage]"); 

Best regards,
Yana
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Nicolas
Top achievements
Rank 1
answered on 21 Aug 2009, 02:11 PM
That's what I needed, thanks.
Tags
ToolBar
Asked by
Nicolas
Top achievements
Rank 1
Answers by
Yana
Telerik team
Nicolas
Top achievements
Rank 1
Share this question
or