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
close icon

Syntax Highlighting Capitalization

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"

1 Reply

AD Administrator Syncfusion Team July 24, 2003 03:44 PM UTC

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.

Live Chat Icon For mobile
Up arrow icon