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

using the rollover from the treeview (vista)

2 Answers 47 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
George Belardo
Top achievements
Rank 1
George Belardo asked on 01 Jul 2008, 05:40 PM
I would like to use the rollover from the treeview in the vista theme in another component i have on my site. Is there a javascript function or css class I can attach too?

2 Answers, 1 is accepted

Sort by
0
Accepted
Alex Gyoshev
Telerik team
answered on 04 Jul 2008, 08:44 AM
Hello George Belardo,

There is no way to use it out-of-the-box outside the component (all styles are targeted specifically in order to prevent messing up other styling on the page). However, you can replicate the styles from the skin and use them with whatever css classes you'd like. These are the necessary styles:
.myClass 
    padding2px 3px
    border: 0; 
 
.myClass:hover 
    padding1px 2px
    color#363636
    border1px solid #99defd
    background#f6fbfd url(<%=ClientScript.GetWebResourceUrl(RadTreeView1.GetType(), "Telerik.Web.UI.Skins.Vista.TreeView.ItemHoveredBg.gif")%>) repeat-x left bottombottom
 

And just a sidenote: in IE6, the :hover pseudo-class does not work for elements other than anchors (links, <a>). In order to make it work, a little bit of javascript can be used to set an additional class.

Regards,
Alex
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
George Belardo
Top achievements
Rank 1
answered on 17 Jul 2008, 03:45 PM
Thanks, that worked.
Tags
TreeView
Asked by
George Belardo
Top achievements
Rank 1
Answers by
Alex Gyoshev
Telerik team
George Belardo
Top achievements
Rank 1
Share this question
or