ParameterInfo.CloseDelimiterCharacter does not seem to work

SyntaxEditor for Windows Forms Forum

Posted 14 years ago by Justin Harrell
Avatar
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]

Comments (1)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Justin,

If the ValidTextRange is set up correctly it should hide if you move the caret outside the range. Our internal OnSelectionChanged handler does this as long as the view has focus at the time.

If the focus is in the view, and the caret is still in the valid text range, it will call UpdateParameterIndex(). If you have a valid ParameterDelimiterCharacter set, it should be watching for the CloseDelimiterCharacter and hiding when appropriate.

Perhaps you didn't set the ParameterDelimiterCharacter?


Actipro Software Support

The latest build of this product (v24.1.0) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.