Posted 19 years ago
by Karl Grambow
Hi,
I'm not sure if it's me that's doing something wrong or if I've stumbled onto a bug (probably me).
I'm basically loading sql server stored procedures into syntax editor and I'm providing an option to either have the key words in uppercase or lowercase.
I've run into a couple of problems.
1) When I'm opening a document that has AutoCaseCorrectEnabled=True everything works fine. However, if I have it set to false I'd expect the relevant key words to be in lowercase but they're not. Any key words that were in uppercase to begin with stay in uppercase.
2) The second problem I'm having has to do with changing an open, syntaxeditor document from AutoCaseCorrectEnabled=true to false. It seems to work fine when going from lowercase to uppercase but it doesn't work when trying to convert existing uppercase key words to lowercase.
Here's a snippet of the code I'm using:
I'm not sure if it's me that's doing something wrong or if I've stumbled onto a bug (probably me).
I'm basically loading sql server stored procedures into syntax editor and I'm providing an option to either have the key words in uppercase or lowercase.
I've run into a couple of problems.
1) When I'm opening a document that has AutoCaseCorrectEnabled=True everything works fine. However, if I have it set to false I'd expect the relevant key words to be in lowercase but they're not. Any key words that were in uppercase to begin with stay in uppercase.
2) The second problem I'm having has to do with changing an open, syntaxeditor document from AutoCaseCorrectEnabled=true to false. It seems to work fine when going from lowercase to uppercase but it doesn't work when trying to convert existing uppercase key words to lowercase.
Here's a snippet of the code I'm using:
'change lowercase key words to uppercase
CurrentEditor.Document.AutoCaseCorrectEnabled = True 'this works fine
CurrentEditor.Document.CaseCorrectText(0, CurrentEditor.Document.Lines.Count - 1)
'OR
'change uppercase key words to lowercase
CurrentEditor.Document.AutoCaseCorrectEnabled = False 'but this doesn't work
CurrentEditor.Document.CaseCorrectText(0, CurrentEditor.Document.Lines.Count - 1)