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

Syntax Highlighting Capitalization

Thread ID:





5910 Jul 23,2003 03:53 PM UTC Jul 24,2003 03:44 PM UTC WinForms 1
Tags: EditControl
John Kellar
Asked On July 23, 2003 03:53 PM UTC

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 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.


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

Live Chat Icon For mobile
Live Chat Icon