I have a wxTextCtrl and I would like to be able to when typing certain key words that after finishing typing the word they key word changes colour.
Asked
Active
Viewed 265 times
-1
-
Your "Question" is a little bit hard to read/understand. More Information would be great. – cptPH May 03 '12 at 12:34
-
Like say notepd++ when you type def when working on .py file it turns blue. – SC7639 May 03 '12 at 13:36
1 Answers
1
You'll need to use a TextCtrl in Rich Text mode or the StyledTextCtrl. Then you'll want to monitor the key presses so you can tell when the user has pressed the spacebar and act on that. You should check out Editra, a Python Editor created in wxPython and included with the wxPython demo and docs package. I am pretty sure it has this functionality already.

Mike Driscoll
- 32,629
- 8
- 45
- 88
-
I'll look into that, I could also do with knowing how to check if the a directory is the same as the directory the file is in – SC7639 May 03 '12 at 14:17