Click here to Skip to main content
15,896,606 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I am new to C++\CLI. I trying to create a text-box with following functionality.

If I write 'A' in the text box, it should automatically be replaced with the word "Alpha" followed by a space.

Also, after every three words it should automatically insert a comma.That is, after "Alpha Beta Gamma" a comma should be inserted. Like this: Alpha beta gamma,

Would ne great if anyone can help.

I am retreiving the values alpha, beta etc from mysql database.

Thanks in Advance!
Posted
Updated 9-May-12 19:21pm
v3
Comments
Richard MacCutchan 9-May-12 9:35am    
Add an event handler that checks what is in the text box.
Sergey Alexandrovich Kryukov 9-May-12 10:09am    
Tag it! WPF? Forms? Silverlight? ASP.NET? What?
--SAq

Thank you for clarification of the question. This past answer can help you:
AutoComplete Text Box in wndows form[^].

—SA
 
Share this answer
 
Comments
Parikraman 10-May-12 5:06am    
Thanks SAKryukov..But what I am trying to achieive here is not just the display of suggestion for the text box. I'll explain more. The values to be used in textbox are fixed. That is, starting from A, text box will have only only one word, Alpha. Similar for other letters. So, the textbox can have only 26 values. Now, once the user presses A, the text box instead of displaying Alpha as suggestion, should automatically be filled with alpha without any user intervention. I hope i am making myself clear.

Thanks..
Sergey Alexandrovich Kryukov 10-May-12 19:19pm    
Well, your requirements are still pretty close to the regular AutoComplete. There are not big secrets here, but this is just some work to do. Perhaps you can still look at this solution and understand how it works, and then you can change it the way you need.
--SA
Hi,
This article explains to create an auto complete TextBox in Windows Forms that gets its data from a database:

http://deepak-sharma.net/2012/03/31/autosuggest-textbox-from-database-column-in-windows-forms/[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900