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

Button text multiline.

1 Answer 233 Views
Button
This is a migrated thread and some comments may be shown as answers.
Technology
Top achievements
Rank 1
Technology asked on 22 Mar 2011, 12:16 PM
Dear support team,

i have a problem with the text property of the button.
As you can see in my attached image, i have a big text for the button.
The problem is that the space between the text lines, are very big and the text is outside the button.

Is this a bug or i'm doing something wrong?
How can i accomplish normal multiline text in the button?

Thank you in advance for your time.

I use Version Q1 2011 released 03/15/2011

George,
Navarino Technology Department.

1 Answer, 1 is accepted

Sort by
0
Accepted
Bozhidar
Telerik team
answered on 22 Mar 2011, 01:33 PM
Hi George,

I think your are using ButtonType="LinkButton". it has a line-height applied equal to the button height and that`s why the second line goes of the button. In the following code I am suggesting as solution in which you could apply an additional CssClass of the two text lines buttons. that CssClass will apply some extra CSS to the beuuton to be rendered properly:

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
    <title></title>
    <style type="text/css">
        .sepLine
        {
            line-height: normal !important;
        }
         
        .sepLine .rbText
        {
            padding-top: 15px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="sm1" runat="server">
    </asp:ScriptManager>
    <telerik:RadButton ID="rb1" runat="server" Text="First Line Second Line" Height="65"
        Width="80px" ButtonType="LinkButton" CssClass="sepLine">
    </telerik:RadButton>
    </form>
</body>
</html>

If you are still experiencing problem, open a support ticket and send us a sample code to test it further.

Best wishes,
Bojo
the Telerik team
Tags
Button
Asked by
Technology
Top achievements
Rank 1
Answers by
Bozhidar
Telerik team
Share this question
or