Width on Combobox

4 posts, 0 answers
  1. Anders Mad.
    Anders Mad. avatar
    42 posts
    Member since:
    May 2006

    Posted 07 May 2008 Link to this post

    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.
  2. Nikolay
    Admin
    Nikolay avatar
    3997 posts

    Posted 07 May 2008 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Anders Mad.
    Anders Mad. avatar
    42 posts
    Member since:
    May 2006

    Posted 07 May 2008 Link to this post

    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.
  5. Grendizer
    Grendizer avatar
    51 posts
    Member since:
    Sep 2008

    Posted 15 Sep 2008 Link to this post

    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.
Back to Top