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.
Unfortunately, activation email could not send to your email. Please try again.

Syntax Highlighting Capitalization

Thread ID:





5910 Jul 23,2003 11:53 AM Jul 24,2003 11:44 AM Windows Forms 1
Tags: EditControl
John Kellar
Asked On July 23, 2003 11:53 AM

Is a way through the configuration files (or another method) to allow the user to type lower case and the result be a colored work which is uppercase or title case depending on the setting? i.e. select * from mytable where name like "john" SELECT * FROM mytable WHERE name LIKE "john" or Select * From mytable Where name Like "john"

Administrator [Syncfusion]
Replied On July 24, 2003 11:44 AM

You will need to handle the key down event and examine the word being typed. Below is an example of this matching the case with the items in the keyword list taken from the settings ini file of the edit control: private void editControl1_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e) { ArrayList list = editControl1.GetKeywordList ("Keyword"); string temp = editControl1.GetWord(editControl1.CurrentLine,editControl1.CurrentChar); foreach(string str in list) { if(temp.ToLower() == str.ToLower()) { temp = str; editControl1.Replace(editControl1.GetWordLocationRange(editControl1.CurrentLine,editControl1.CurrentChar),temp); break; } } } Regards, Guru.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.