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

Width property

2 Answers 48 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Robert Verderber
Top achievements
Rank 2
Robert Verderber asked on 12 Nov 2009, 06:34 PM
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 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 17 Nov 2009, 02:57 PM
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.
0
Teodorico
Top achievements
Rank 1
answered on 26 Jan 2010, 12:27 AM

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
Tags
ComboBox
Asked by
Robert Verderber
Top achievements
Rank 2
Answers by
Peter
Telerik team
Teodorico
Top achievements
Rank 1
Share this question
or