5 Answers, 1 is accepted
0
Hello Craig,
You can easily achieve your goal by either setting CSS class to the tab, i.e.
or by setting the width of the element:
Regards,
Paul
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
You can easily achieve your goal by either setting CSS class to the tab, i.e.
function addTab() |
{ |
var tabStrip = $find("<%= RadTabStrip1.ClientID %>"); |
tabStrip.trackChanges(); |
var tab = new Telerik.Web.UI.RadTab(); |
tabStrip.get_tabs().add(tab); |
tab.set_text("Child Tab " + tabStrip.get_tabs().get_count()); |
tab.set_cssClass("t1"); |
tabStrip.commitChanges(); |
} |
or by setting the width of the element:
function addTab() |
{ |
var tabStrip = $find("<%= RadTabStrip1.ClientID %>"); |
tabStrip.trackChanges(); |
var tab = new Telerik.Web.UI.RadTab(); |
tabStrip.get_tabs().add(tab); |
tab.set_text("Child Tab " + tabStrip.get_tabs().get_count()); |
tab.get_element().style.width = "350px"; |
tabStrip.commitChanges(); |
} |
Regards,
Paul
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
pucsoftware
Top achievements
Rank 1
answered on 09 Sep 2009, 09:31 PM
I am trying to the exact same thing but with the BackColor of the tab and I can't get this to work. Can any body help?
works
tab.get_element().style.width = "350px";
doesn't work
tab.get_element().style.backgroundColor = "#fffefe";
works
tab.get_element().style.width = "350px";
doesn't work
tab.get_element().style.backgroundColor = "#fffefe";
0
Hi pucsoftware,
Setting the backgroundColor is highly dependent on the skin - since most of them use background images, the property will not work in the scenarios. The Simple skin is the one that supports such modifications out-of-the-box.
Kind regards,
Alex
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Setting the backgroundColor is highly dependent on the skin - since most of them use background images, the property will not work in the scenarios. The Simple skin is the one that supports such modifications out-of-the-box.
Kind regards,
Alex
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
pucsoftware
Top achievements
Rank 1
answered on 10 Sep 2009, 02:00 PM
I am using the simple skin. Other than changing the default colors for the simple skin I haven't changed anything. I can tell that the property is being set, as when I rolloever the image the background color is being set, but it is behind the element that is the rollover element. This tells me that setting is being made but that the wrong element is being changed. Is there something else I can do? I've tried resetting the class name with classname += " .myclass" but it doesn't quite work. Do have an example that shows this can work?
0
Hello pucsoftware,
Please refer to the attached website for an example.
Kind regards,
Alex
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Please refer to the attached website for an example.
Kind regards,
Alex
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.