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

Problem with width and height.

4 Answers 127 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Rosen
Top achievements
Rank 1
Rosen asked on 17 Feb 2009, 02:26 PM
Hi guys. I can not find a way for the width and height of the control to be automatically determied, so no scrollbars are present. Could somebody help me with this?

4 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 23 Feb 2009, 05:49 PM
Hi Rosen,

Unfortunately RadComboBox does not support this capability in a cross-browser way. By default if you don't set the Width property of RadComboBox the item text will wrap (instead of creating scrollbars). You can use the DropDownWidth property to control the width of the items.

Regards,
Albert
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Rosen
Top achievements
Rank 1
answered on 24 Feb 2009, 11:16 AM
Thank you Albert. What are the non cross-browser options?
0
Atanas Korchev
Telerik team
answered on 24 Feb 2009, 11:54 AM
Hi Rosen,

There are a few CSS overrides which will work in non-IE browsers. In IE items which have shorter text keep their size. Anyway here is the required CSS:
    <style type="text/css">
    .rcbList
    {
        white-space:nowrap;
    }
   
    .rcbList li
    {
        border: 1px solid red;
        position: relative;
        display:inline-block;
    }
   
    .RadComboBoxDropDown,
    .rcbScroll
    {
        overflow: visible !important;
        width: auto !important;
    }
    </style>

Greetings,
Albert
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Rosen
Top achievements
Rank 1
answered on 24 Feb 2009, 01:14 PM
Thanks a lot.
Tags
ComboBox
Asked by
Rosen
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Rosen
Top achievements
Rank 1
Share this question
or