Posted 17 years ago
by Kevin Bennett

I'm trying to mimic the way Visual Studio auto-formats some code, and I'm running into an issue with the trailing space that is inserted after a memberlist item is added to the syntaxeditor.
For example...
The desired formatting I have is Fields.Field1.Field1Property
both Field1 and Field1Property are entered in via a memberlist after a memberlist trigger brings up on the options when the user types "."
However, in the editor, the memberlist adds a space automatically after the item that was inserted. So I end up with the following...
Fields.Field1 .Field1Property
In an attempt to get rid of the space before "field1property", in the event of IntellipromptMemberListClosed, I scan backwards in the textstream to find the End of the Field1 Token and the Beginning of the "." token. Then I delete the text. This essentially consolodates down to one space. Namely, if I had Fields.Field1 .Field1Property, I would end back at Fields.Field1 .Field1Property
I have tried a few different routes at this, and can't seem to get rid of this space. Any ideas?
Thanks in advance for any help
For example...
The desired formatting I have is Fields.Field1.Field1Property
both Field1 and Field1Property are entered in via a memberlist after a memberlist trigger brings up on the options when the user types "."
However, in the editor, the memberlist adds a space automatically after the item that was inserted. So I end up with the following...
Fields.Field1 .Field1Property
In an attempt to get rid of the space before "field1property", in the event of IntellipromptMemberListClosed, I scan backwards in the textstream to find the End of the Field1 Token and the Beginning of the "." token. Then I delete the text. This essentially consolodates down to one space. Namely, if I had Fields.Field1 .Field1Property, I would end back at Fields.Field1 .Field1Property
I have tried a few different routes at this, and can't seem to get rid of this space. Any ideas?
Thanks in advance for any help