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

Width on Combobox

3 Answers 146 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Anders Mad.
Top achievements
Rank 2
Anders Mad. asked on 07 May 2008, 11:08 AM
The width on combobox is being set to 160px for the width from the bin code if no width attribute has been parsed to it.

I think this is bad since the default width should be controlled by the skin css and not from the bin/dll.

I found a hack for this, but it will change all ComboBox sizes and overrule the width attribute, but most importantly it overrules the static 160px width which was needed for this customer (without changing all pages) when upgrading to the AJAX version.

Create a css class called ".RadComboBox_SKIN" where SKIN is the skin name (working on a custom skin here) and add min-width or max-width to make it bigger or smaller. I guess it won't work in IE6 thou.

3 Answers, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 07 May 2008, 11:27 AM
Hi Anders M.,

The default width is needed because of the rendering mechanism of the combobox. Setting the width in the skin's css file would not be applied at the proper time when the combobox needs its width to properly render the input field.

You can, however, control the width using the Width property of the combobox.

Regards,
Nick
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Anders Mad.
Top achievements
Rank 2
answered on 07 May 2008, 01:25 PM
Yes thanks, I know about the Width attribute for the control - just wanted to adjust by the skin rather than have to mix the markup with visual settings.

But alright, too bad that the dll/bin > css for the visuals here.
0
Grendizer
Top achievements
Rank 1
answered on 15 Sep 2008, 03:19 PM
Hello guys,

Sorry to raise back this old thread, but is there any way to set default width of a control like textbox or combobox without using the Width property of each instance ?!

As Anders said, it would have been great to do this using the skins ...

Thanks in advance for your answer.
Tags
ComboBox
Asked by
Anders Mad.
Top achievements
Rank 2
Answers by
Nikolay
Telerik team
Anders Mad.
Top achievements
Rank 2
Grendizer
Top achievements
Rank 1
Share this question
or