We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Selecting Text in a ComboBoxAutoComplete

It doesn''t seem possible to select text in the textbox portion of a ComboBoxAutoComplete control, is this correct? My users want to highlight the text and hit backspace to erase it. Thanks, Ben.

2 Replies

AD Administrator Syncfusion Team August 16, 2004 08:17 PM UTC

Hi Ben, Set the AutoCompleteComboBox''s AllowNewText property to true and handle its MouseDown event as shown below for this purpose : private void comboBoxAutoComplete1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) { this.comboBoxAutoComplete1.SelectAll(); } Now you can delete the text in the ComboBoxAutocomplete using the Backspace/Delete keys. Note that the ComboBoxAutocomplete''s DropDownStyle should be set to DropDown. Please refer to the test sample that illustrates this, and let me know if this meets your requirements. Regards, Guru Patwal Syncfusion, Inc.


AD Administrator Syncfusion Team August 17, 2004 05:45 AM UTC

Hi Guru, Yes, this works fine. Thanks very much. Ben.

Loader.
Live Chat Icon For mobile
Up arrow icon