DropDown width for TextBox with AutoComplete

3 posts, 0 answers
  1. Roberto Wenzel
    Roberto Wenzel avatar
    41 posts
    Member since:
    Sep 2012

    Posted 10 Feb 2011 Link to this post

    Hello,
    is there a way to set the dropdown width for a text box with autocomplete programmatically.
    In my case I have a narrow TextBox. When there are too many entries for selection a scroll bar overlays the items.
    Please see the attached images.
    Thank you for any hint.
    Regards Roberto
  2. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 11 Feb 2011 Link to this post

    Hello Roberto,

    As far as I know it is not possible to change the AutoComplete DropDown Width. The RadTextBox contains at it's heart a HostedTextBoxBase which is inherited from Microsofts own TextBox which is providing the AutoComplete functionality. The Microsoft API for TextBox does now allow for access to the AutoComplete Drop Down.

    Hope that helps
    Richard
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Ivan Todorov
    Admin
    Ivan Todorov avatar
    688 posts

    Posted 11 Feb 2011 Link to this post

    Richard is correct. Our RadTextBox control wraps the generic TextBox provided with the .NET and uses its auto complete mechanism, and there is no way you can access the auto complete dropdown. A quick Google search shows some workarounds though (note that these have not been tested and are not supported by Telerik):

    http://social.msdn.microsoft.com/Forums/en/winformsdesigner/thread/f88f37c9-95f9-4f2f-84b5-e262f49a009d

    http://stackoverflow.com/questions/4820429/combo-box-drop-down-width-on-suggest

    Hope this.

    All the best,
    Ivan Todorov
    the Telerik team
    Q3’10 SP1 of RadControls for WinForms is available for download; also available is the Q1'11 Roadmap for Telerik Windows Forms controls.
Back to Top