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

DropDown width for TextBox with AutoComplete

2 Answers 162 Views
TextBox
This is a migrated thread and some comments may be shown as answers.
Roberto Wenzel
Top achievements
Rank 2
Roberto Wenzel asked on 10 Feb 2011, 05:07 PM
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 Answers, 1 is accepted

Sort by
0
Richard Slade
Top achievements
Rank 2
answered on 11 Feb 2011, 02:06 PM
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
0
Ivan Todorov
Telerik team
answered on 11 Feb 2011, 05:26 PM
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.
Tags
TextBox
Asked by
Roberto Wenzel
Top achievements
Rank 2
Answers by
Richard Slade
Top achievements
Rank 2
Ivan Todorov
Telerik team
Share this question
or