I m trying to add an intra text control following your example, but instead of being on the left of the text, I need it to be on the right. How do i accomplish this?
I am using the intratext adornment to the right of a token by using the end offset of the token as the tag range, e.g. "token[adornment]"
The adornment is always rendered to the left of the caret, i.e. I am unable to place the caret in between my token and the adornment e.g. "token|[adornment]". User can only type after the adornment as the caret can only be placed after the adornment, "token[adornment]|"
This makes typing very weird as typing 'a' after the adornment results in: "tokena[adornment]|". Typing backspace now results in "token[adornment]|". This is because our language considers 'tokena' as a token to add an adornment for.
Is there a way to render the adornment to the right of the caret instead of the left? In other words, we need to be able to put the caret between the token and the adornment "token|[adornment]". We will not need to put the caret between the adornment and the character after it, so the adornment still does not take up any offset. I do not want to add a collapsed region tag using a dummy character as it will affect our document and language. If there isn't an existing way, is it possible for Actipro to give us an option to do so? This behavior severely affects our usability during typing.
Sorry but we don't have an option at this time for determining if the caret stop is on the left or right of the intra-text spacer. Right now the caret stop is always just left of the text at the offset. We will mark down a request to add an option for that
I am trying to put adornments on the right of tokens but I cannot understand how to modify the tagger to achieve this.
My IntraTextTag class does not implement the IClassificationTag. It implements only the IIntraTextSpacerTag.
Because I do not need to highlight those tokens.
I would appreciate it if you could give me some sample code.
Intra-text spacers only appear to the left of the tagged range at this time. There is a request per this thread to add an option for displaying on the right instead, but we haven't gotten to that as of yet.
Without that option, the only way to get the spacer on the other side would be to tag the next character over.
I see. Thank you.
Please log in to a validated account to post comments.