SetTypedcharacters on Memberlist

SyntaxEditor for Windows Forms Forum

Posted 14 years ago by Erik Pepping - RADVenture B.V
Avatar
We are building statement completion, but automatic, so not tied to a specific character. So if you type "I" it shows among others the "if" statement. But if you select "if", "iif" is pasted into the editor. So an "i" is already typed by the user. Can we get a SetTypedCharacters method on the Memberlist so the character already typed can be passed and not typed again by the intelliprompt list ?

Erik Pepping

Comments (4)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Do you mean that you already have some text entered that you want to be considered as in the valid range for typed text of the member list before the member list is displayed?

If so, use the member list's CompleteWord method.


Actipro Software Support

Posted 14 years ago by Boyd - Automated Software Testing Consultant / Developer, Patterson Consulting, LLC
Avatar
It sounds like you need to use the overloaded Show method that allows you to specify 'offset' and 'length'. The 'offset' is the first offset where text should be considered already typed. In your example, this would be the offset where the 'i' is located. For length, you'd specify '1' to include just the one character. When the MemberList.Show method is called with these parameters, it will behave as if the 'i' was already typed. When an item is selected from the list, and text that was included by the 'offset' and 'length' parameters will be replaced by the selected member item. So in your example, the pre-typed 'i' would be replaced by 'if' and get rid of the 'iif' problem.

Hope this helps.
Posted 14 years ago by tobias weltner
Avatar
I have a related question. I also use memberlists for autocompletion, and yes using the overloaded Show method solves the described problem (just set offset and length of the already typed in text).

However, I noticed that if you have only one entry in the memberlist, it shows an ugly gray space below the one element as if the minimum height of the memberlist was set larger than the space needed for one element. Is there a workaround?
Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
I just tested here and it looks as it should. There is a 3D border around the member list so there is a white border on top/left and gray border on bottom/right.


Actipro Software Support

The latest build of this product (v2018.1 build 0341) was released 6 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.