SyntaxEditor for Windows Forms Forum

Posted 19 years ago by Erik Pepping - RADVenture B.V
When using the IntelliPromptMemberListItem constructor:

IntelliPromptMemberListItem(string text, int imageIndex, string
description, string autoCompletePreText, string autoCompletePostText,
object tag);

the added items behave differently in the memberlist. I could also
reproduce this in the example application by adding the two lines below:

IntelliPromptMemberListItem("ItemAddedWithFiveParameterConstructor", 22,
"ItemAddedWithFiveParameterConstructor", null,

or", 22, "AnotherItemAddedWithThreeParameterConstructor"));

When the Memberlist is shown and select
ItemAddedWithFiveParameterConstructor with the cursor keys or by typing
and then press dot ".", you will notice that nothing happens. While the
AnotherItemAddedWithThreeParameterConstructor behaves as expected.

Perhaps I'm using the constructor in a wrong way?

Met vriendelijke groet,

Comments (2)

Posted 19 years ago by Actipro Software Support - Cleveland, OH, USA
The 3-parameter constructor ends up calling the 5-parameter one like this:
public IntelliPromptMemberListItem(string text, int imageIndex, string description) : 
this(text, imageIndex, description, text, null, null) {}
By specifying something for the pre- or post-text parameters, you end up telling SyntaxEditor to insert that text before and after the caret when the auto-complete occurs instead of inserting the value of the text parameter. So they override the text parameter. Does that help?

Actipro Software Support

Posted 19 years ago by Erik Pepping - RADVenture B.V
Ok, it works now, thanks.

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

Add Comment

Please log in to a validated account to post comments.