ScrollChildren and EnableEmbeddedSkins

2 posts, 0 answers
  1. Dan
    Dan avatar
    40 posts
    Member since:
    Mar 2009

    Posted 17 Jul 2009 Link to this post

    I am using a TabStrip control with the following definition:
                <telerik:RadTabStrip ID="RadTabStrip1" SelectedIndex="0" runat="server" MultiPageID="RadMultiPage1" 
                    Width="100%" EnableEmbeddedSkins="False" Skin="" ScrollChildren="true">  
                </telerik:RadTabStrip> 
                <telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0">  
                </telerik:RadMultiPage> 
     

    I am creating the tabs in code with user controls:
        Private lngCampaignId As SqlDecimal  
        Public Property CampaignId() As SqlDecimal  
            Get  
                Return lngCampaignId  
            End Get  
            Set(ByVal value As SqlDecimal)  
                lngCampaignId = value 
            End Set  
        End Property  
     
        Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load  
            Dim CCBll As New CampaignChildBLL  
            Dim CampaignChildTable As New CampaignChild_DB.CampaignChildDataTable  
            Dim CampaignChildRow As CampaignChild_DB.CampaignChildRow = Nothing 
            Dim tab As RadTab  
            Dim pageView As RadPageView  
     
            If Not Page.IsPostBack Then  
                'Retrieve child campaigns  
                CampaignChildTable = CCBll.GetCampaignChildByCampaignId(CampaignId)  
     
                For Each CampaignChildRow In CampaignChildTable  
                    tab = New RadTab  
                    tab.Text = CampaignChildRow.ChildCampaignName  
                    tab.CssClass = "normaltab" 
                    tab.SelectedCssClass = "selectedtab" 
                    tab.HoveredCssClass = "hovertab" 
     
                    RadTabStrip1.Tabs.Add(tab)  
     
                    pageView = New RadPageView  
                    pageView.ID = CampaignChildRow.ChildCampaignId  
                    pageView.CssClass = "pageview" 
                    RadMultiPage1.PageViews.Add(pageView)  
                Next  
            End If  
        End Sub  
     
        Protected Sub RadMultiPage1_PageViewCreated(ByVal sender As Object, ByVal e As RadMultiPageEventArgs) Handles RadMultiPage1.PageViewCreated  
            Dim CampaignId As String = e.PageView.ID  
            Dim c As New Campaign  
            Dim cd As New CampaignData  
            Dim success As Boolean  
            Dim ctl As Control  
     
            c.ID = CampaignId 
            success = cd.RetrieveCampaign(c)  
     
            'Load the appropriate template editing control  
            Select Case c.CampaignTemplateId  
                Case Campaign.CampaignTemplate.Feature  
                    ctl = LoadControl("ctlFeaturedResource.ascx")  
                    ctl.ID = CampaignId & "_ctl"  
                    CType(ctl, ctlFeaturedResource).CampaignId = CampaignId  
                    e.PageView.Controls.Add(ctl)  
     
                Case Campaign.CampaignTemplate.List  
                    ctl = LoadControl("ctlFeaturedList.ascx")  
                    ctl.ID = CampaignId & "_ctl"  
                    CType(ctl, ctlFeaturedList).CampaignId = CampaignId  
                    e.PageView.Controls.Add(ctl)  
     
                    'Case Campaign.CampaignTemplate.PromoFeature  
                    '    ctl = LoadControl("ctlPromoResource.ascx")  
                    '    ctl.ID = CampaignId & "_ctl"  
                    '    CType(ctl, ctlPromoResource).CampaignId = CampaignId  
                    '    e.PageView.Controls.Add(ctl)  
     
                Case Campaign.CampaignTemplate.Broadcast  
                    ctl = LoadControl("ctlTodaysBroadcast.ascx")  
                    ctl.ID = CampaignId & "_ctl"  
                    e.PageView.Controls.Add(ctl)  
     
                Case Campaign.CampaignTemplate.Substitute  
                    ctl = LoadControl("ctlTodaysBroadcast.ascx")  
                    ctl.ID = CampaignId & "_ctl"  
                    e.PageView.Controls.Add(ctl)  
     
                Case Campaign.CampaignTemplate.Odyssey  
                    ctl = LoadControl("ctlOdysseyBroadcast.ascx")  
                    ctl.ID = CampaignId & "_ctl"  
                    CType(ctl, ctlOdysseyBroadcast).CampaignId = CampaignId  
                    e.PageView.Controls.Add(ctl)  
     
                Case Campaign.CampaignTemplate.Rotator  
                    ctl = LoadControl("ctlProductRotator.ascx")  
                    ctl.ID = CampaignId & "_ctl"  
                    CType(ctl, ctlProductRotator).CampaignId = CampaignId  
                    e.PageView.Controls.Add(ctl)  
            End Select  
        End Sub  
     

    And using the following css:
    .normaltab  
    {  
        background: url('../Images/bookstore_activetab.jpg') no-repeat;  
        font-family: Verdana, Arial, Helvetica, sans-serif;  
        font-size: 11px;  
        text-align:left;  
        width: 175px;  
        height: 28px;  
        color: #5b3b23;  
        padding-top: 10px !important;  
    }  
     
    .selectedtab  
    {  
        background: url('../images/bookstore_inactivetab.jpg') no-repeat;  
    }  
     
    .hovertab  
    {  
        color: #ad9d91;  
    }  
     
    .pageview  
    {  
        background-color: #EBF5F6;  
    }  
     

    My problem is that when I have ScrollChildren on, my tabs disappear.  I believe that it is because I am not using a standard skin.  Can you tell me what other css styles I need to define in order to use ScrollChildren with my custom tab css.

    Thanks.
    Dan
  2. Yana
    Admin
    Yana avatar
    4841 posts

    Posted 23 Jul 2009 Link to this post

    Hi Dan,

    You should set backround images to the arrows which are used for the scrolling like this:

     for the left image:
    .RadTabStrip .rtsPrevArrow,   
    .RadTabStrip .rtsPrevArrowDisabled {  
       backgroundtransparent url(someImage.gif) no-repeat;   

    and for the right:

    .RadTabStrip .rtsNextArrow,   
    .RadTabStrip .rtsNextArrowDisabled {  
       backgroundtransparent url(someImage.gif) no-repeat;   

    Greetings,
    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.
Back to Top