Posted 14 years ago
by Justin Harrell
I am trying to implement a ParameterInfo tooltip for T-SQL functions which has a pretty standard function syntax using parenthesis and commas for delimiters.
I can get it to show up properly based open parenthesis using the keytyped event but it will not close using close parenthesis unless two closed parenthesis are typed.
For instance typing "dateadd(" causes the parameterinfo for dateadd to show, but it will not close unless "))" is typed.
This may be my lack of fully understanding the ValidTextRange and CloseDelimiterCharacter properties of the ParameterInfo.
My code is based on the SimpleSyntaxLanguage sample. However it looks like what is actually hiding the ParameterInfo in SimpleSyntaxLanguage is another case in the keytyped handler for closed parenthesis and not CloseDelimiterCharacter.
Also it does not seem to be closing when going forward out of ValidTextRange, but does close if the caret goes backwards before the startoffset.
Currently I simply added a case in my keytyped handler to do a ParameterInfo.Hide() when typing the closed parenthesis, but this seems to make CloseDelimiterCharacter serve no purpose.
Thanks for any help.
[Modified at 09/28/2010 12:50 PM]
I can get it to show up properly based open parenthesis using the keytyped event but it will not close using close parenthesis unless two closed parenthesis are typed.
For instance typing "dateadd(" causes the parameterinfo for dateadd to show, but it will not close unless "))" is typed.
This may be my lack of fully understanding the ValidTextRange and CloseDelimiterCharacter properties of the ParameterInfo.
My code is based on the SimpleSyntaxLanguage sample. However it looks like what is actually hiding the ParameterInfo in SimpleSyntaxLanguage is another case in the keytyped handler for closed parenthesis and not CloseDelimiterCharacter.
Also it does not seem to be closing when going forward out of ValidTextRange, but does close if the caret goes backwards before the startoffset.
Currently I simply added a case in my keytyped handler to do a ParameterInfo.Hide() when typing the closed parenthesis, but this seems to make CloseDelimiterCharacter serve no purpose.
Thanks for any help.
[Modified at 09/28/2010 12:50 PM]