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

Two lines in a template

10 Answers 79 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Oded
Top achievements
Rank 1
Oded asked on 14 Feb 2010, 01:03 PM
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

10 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 17 Feb 2010, 12:54 PM
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.
0
Oded
Top achievements
Rank 1
answered on 17 Feb 2010, 01:02 PM
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
0
Yana
Telerik team
answered on 17 Feb 2010, 02:40 PM
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.
0
Oded
Top achievements
Rank 1
answered on 17 Feb 2010, 03:14 PM
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
0
Yana
Telerik team
answered on 19 Feb 2010, 10:57 AM
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.
0
Oded
Top achievements
Rank 1
answered on 21 Feb 2010, 09:08 AM
Hi,

Attached is the screen shot.

Thank you,
Oded
0
Yana
Telerik team
answered on 24 Feb 2010, 02:17 PM
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.
0
Oded
Top achievements
Rank 1
answered on 02 Mar 2010, 08:45 AM
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
0
Accepted
Yana
Telerik team
answered on 02 Mar 2010, 09:23 AM
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.
0
Oded
Top achievements
Rank 1
answered on 02 Mar 2010, 09:24 AM
Thank you Yana, I will give it a shot.

Oded
Tags
TabStrip
Asked by
Oded
Top achievements
Rank 1
Answers by
Yana
Telerik team
Oded
Top achievements
Rank 1
Share this question
or