Quantcast
Channel: TX Text Control Community
Viewing all articles
Browse latest Browse all 1022

[OPEN] Strange ControlChars Caret Character ^ Exception when pressing Home-Key

$
0
0
Hello, we have a document that includes a strange Caret-Character ^

It is not really the ^ because the ^ is at the BOTTOM of a Cell.

The Character is not selectable.
It is not clear how this character made it into the document.

1. Start Demo (TX20)
2. In the Line "B, C, D, E" klick the mouse so that the cusor is after the E and after the ^
3. Press "Home"-Key (Pos1 in German)
4. System.IndexOutOfRangeException: Der Index war außerhalb des Arraybereichs.
bei TXTextControl.TextChar.get_Char()



Code:

  int currentPos = textControl1.InputPosition.TextPosition;

  //Array-Execption because TextChars doesnt have that ^-Character although it is in the document
 textControl1.TextChars[currentPos].Char

Questions:

a) Where does this ^-Character come from?
b) How to avoid that the Character gets in the document somehow and avoid the exception?
(Well we could of course check the array and we will do that - but the question is why textControl1.InputPosition.TextPosition gives
that faulty index)

Regards,

Deniz

Viewing all articles
Browse latest Browse all 1022

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>