Textbox autocomplete working only if multiline is set to false

N

nagar

I noticed that the textbox autocomplete feature works only if
multiline is set to false. Is there a way to have it work with
multiline set to true.
Thanks.
Andrea
 
L

Linda Liu [MSFT]

Hi Andrea,

Yes, you're right. The auto complete feature for TextBox works only if the
TextBox's Mulitline property is set to false. The following MSDN document
has stated this explicitly:

http://msdn2.microsoft.com/en-us/library/system.windows.forms.textbox.autoco
mpletesource.aspx

In my opinion, auto complete feature makes sense for one line of text,
rather than multiline text. This is maybe why the auto complete feature
doesn't work on multiline TextBox contols.

However, if you do need to support the auto complete feature for multiline
TextBox controls, you may implement it by yourself. I search and find a
auto complete sample for you. Although in this sample the auto complete
function doesn't work when the custom TextBox's Multiline property is set
to true, you can learn the thinking of implementing the auto complete
feature form it.

'Autocomplete Textbox Control'
http://www.codeproject.com/cs/miscctrl/AutoCompleteControl.asp

Hope this helps.
If you have any question, please feel free to let me know.

Sincerely,
Linda Liu
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 
N

nagar

Thanks Linda. That makes sense. I used multiline with a custom control
I created in .NET 1.1. I think I'll move mack to one line control
using the .NET 2.0 autocomplete native function of the textbox
control.
Thanks
Andrea
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top