Two lines in a template

11 posts, 1 answers
  1. Oded
    Oded avatar
    21 posts
    Member since:
    Feb 2009

    Posted 14 Feb 2010 Link to this post

    Hello,

    I have created a template in runtime and instantiate it in for some of the tabs.

    The problem I have is that the template is two lines high and the skin which I use (Outlook) is now shown properly (i.e. the image is sliding to the bottom of the templated tab) and it looks like there are two tab, one on top of the other.

    Any ideas?

    Thanks,
    Oded
  2. Yana
    Admin
    Yana avatar
    5043 posts

    Posted 17 Feb 2010 Link to this post

    Hi Oded,

    This is caused by the tabstrip's sprite background image. Could you please paste here the template you're using? Thanks


    Best regard,
    Yana
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. Oded
    Oded avatar
    21 posts
    Member since:
    Feb 2009

    Posted 17 Feb 2010 Link to this post

    Here is the template class
        Private Class StructureTabTemplate  
            Implements ITemplate  
     
              
            Public Sub InstantiateIn(ByVal container As System.Web.UI.Control) Implements System.Web.UI.ITemplate.InstantiateIn  
                Dim nameLabel As New Label()  
                Dim dateLabel As New Label()  
                nameLabel.ForeColor = Drawing.Color.Maroon  
                dateLabel.ForeColor = Drawing.Color.Maroon  
                dateLabel.Style.Add("display""block")  
     
     
                AddHandler nameLabel.DataBinding, AddressOf nameLabel_DataBinding  
                AddHandler dateLabel.DataBinding, AddressOf dateLabel_DataBinding  
     
                container.Controls.Add(nameLabel)  
                container.Controls.Add(dateLabel)  
     
            End Sub 
     
            Private Sub nameLabel_DataBinding(ByVal sender As ObjectByVal e As EventArgs)  
                Dim label As Label = DirectCast(sender, Label)  
                Dim tab As RadTab = DirectCast(label.NamingContainer, RadTab)  
                label.Text = tab.Value  
            End Sub 
     
            Private Sub dateLabel_DataBinding(ByVal sender As ObjectByVal e As EventArgs)  
                Dim label As Label = DirectCast(sender, Label)  
                label.Text = "Data bound data" 
            End Sub 
        End Class 

    Instead of using the Style.Add("display", "block") I also tried adding a <br /> tag and got the same result.

    Thanks,
    Oded
  4. Yana
    Admin
    Yana avatar
    5043 posts

    Posted 17 Feb 2010 Link to this post

    Hi Oded,

    Please add the following css styles to your page and let us know how it goes:

    <style type="text/css">
        div.RadTabStrip .rtsIn {
            padding:1px 5px;
         }
          
        div.RadTabStrip_Outlook .rtsLI,
        div.RadTabStrip_Outlook .rtsLink {
            line-height:12px;
        }
    </style>

    Kind regards,
    Yana
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  5. Oded
    Oded avatar
    21 posts
    Member since:
    Feb 2009

    Posted 17 Feb 2010 Link to this post

    Hello,

    It is much better but I still see another image at the buttom of the tab.
    What is the best solution for this issue?

    Thanks,
    Oded
  6. Yana
    Admin
    Yana avatar
    5043 posts

    Posted 19 Feb 2010 Link to this post

    Hi Oded,

    It looks ok at our side, can you send us a screenshot?

    Kind regards,
    Yana
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  7. Oded
    Oded avatar
    21 posts
    Member since:
    Feb 2009

    Posted 21 Feb 2010 Link to this post

    Hi,

    Attached is the screen shot.

    Thank you,
    Oded
  8. Yana
    Admin
    Yana avatar
    5043 posts

    Posted 24 Feb 2010 Link to this post

    Hello Oded,

    I noticed in the screenshot that you have also tabs with text in one row. I've attached my test page to demonstrate how you can fix this. Please download it and give it a try.

    Best regards,
    Yana
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  9. Oded
    Oded avatar
    21 posts
    Member since:
    Feb 2009

    Posted 02 Mar 2010 Link to this post

    Hi Yana,

    I have made the change you suggested. Now the tab does contain two rows but the text is not so readable.

    I guess I will have to use a different solution to display the information I wanted (not inside the tab).

    Thank you,
    Oded
  10. Answer
    Yana
    Admin
    Yana avatar
    5043 posts

    Posted 02 Mar 2010 Link to this post

    Hi Oded,

    The other option is to use Simple skin which allows to set bigger Height of the tabs.

    Best wishes,
    Yana
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  11. Oded
    Oded avatar
    21 posts
    Member since:
    Feb 2009

    Posted 02 Mar 2010 Link to this post

    Thank you Yana, I will give it a shot.

    Oded
Back to Top