Width property

3 posts, 0 answers
  1. Robert Verderber
    Robert Verderber avatar
    33 posts
    Member since:
    Aug 2005

    Posted 12 Nov 2009 Link to this post

    Is there something different about a RadCombo box and how it is rendered with the width property? When ever I set the width property to the same width as another control (usually a text box) I notice that the rendered combo width is usually not as wide as the other controls set to the same width. Looks like it around 5 pixels shorter. I always have to tweak it to make it line up with the other controls on the page.

  2. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 17 Nov 2009 Link to this post

    Hi Robert,

    I did the following test and it looks like RadComboBox renders correctly compared to a simple div. You are right that it is shorter compared to an asp TextBox control for example, but I believe that this is a problem with the other control, not RadComboBox. Let me know what you think.

    <asp:TextBox ID="TextBox1" Width="200px" runat="server"></asp:TextBox>   
          
    <div style="width:200px; height:20px; background:gray"></div>
          
    <telerik:RadComboBox ID="RadComboBox" Width="200px" runat="server">
            </telerik:RadComboBox>


    Best wishes,
    Peter
    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Teodorico
    Teodorico avatar
    39 posts
    Member since:
    Feb 2009

    Posted 25 Jan 2010 Link to this post

    Hi Peter,

    I also noticed the same issue, but I believe the asp:TextBox is rendering using the box-model. That is why a width of 200px will render as 202px on the screen (200 + 1 'left border' + 1 'right border'); at least on FF.

    The ComboBox is rendering as a 200px including the borders. So as of tweak, text boxes will have to be 2 pixels shorter than the ComboBox.

    Regards,

     

    Teo
Back to Top