Posted 19 years ago
by Boyd
-
Sr. Software Developer,
Patterson Consulting, LLC
I'm currently working on implementing CodeSnippets in SE 3.0. Everything has been working great, except for the SpanIndicators used to indicate the Code Snippet Fields. Specifically, my problem deals with typing text adjacent to an indicator.
Let's say I have the following text:
blah blah FieldValue blah blah
and I have a SpanIndicator that covers the text "FieldValue" (offset = 10, length = 10).
If I type text in the middle of "FieldValue" to change it to "FieldMidValue", the SpanIndicator expands to include the typed text. This is perfect!
If I position the caret before the "F" and change "FieldValue" to "StartFieldValue", the SpanIndicator does not include my newly typed text. It still only covers "FieldValue".
Likewise, if I position the caret after the "e" and change "FieldValue" to "FieldValueEnd", the SpanIndicator does not include my newly typed text.
How do I make the SpanIndicator include the text that is typed immediately before or after it (just like the text typed in the middle)?
If there's no way to currently do this, could you consider adding any/all of the following:
1) (Prferrably) A property for the SpanIndicator class to indicate if text typed adjacent to the SpanIndicator is included or excluded from the SpanIndicator
2) Change offset/length properties to be read/write so adjustments can be made in "Document_TextChanged" event.
3) Add methods to adjust the location of the SpanIndicator so adjustments can be made in "Document_TextChanged" event.
Thanks for the help! The "KeyTyping" event in SE 3.0 has made CodeSnippets pretty easy to implement (aside from the SpanIndicator issue).
Let's say I have the following text:
blah blah FieldValue blah blah
and I have a SpanIndicator that covers the text "FieldValue" (offset = 10, length = 10).
If I type text in the middle of "FieldValue" to change it to "FieldMidValue", the SpanIndicator expands to include the typed text. This is perfect!
If I position the caret before the "F" and change "FieldValue" to "StartFieldValue", the SpanIndicator does not include my newly typed text. It still only covers "FieldValue".
Likewise, if I position the caret after the "e" and change "FieldValue" to "FieldValueEnd", the SpanIndicator does not include my newly typed text.
How do I make the SpanIndicator include the text that is typed immediately before or after it (just like the text typed in the middle)?
If there's no way to currently do this, could you consider adding any/all of the following:
1) (Prferrably) A property for the SpanIndicator class to indicate if text typed adjacent to the SpanIndicator is included or excluded from the SpanIndicator
2) Change offset/length properties to be read/write so adjustments can be made in "Document_TextChanged" event.
3) Add methods to adjust the location of the SpanIndicator so adjustments can be made in "Document_TextChanged" event.
Thanks for the help! The "KeyTyping" event in SE 3.0 has made CodeSnippets pretty easy to implement (aside from the SpanIndicator issue).