Cursor drifting away as you type.

  • Since releasing the word processor with our product, we've started seeing a few complains about the cursor drifting away from the actual insertion point while text is being entered or edited.

    After searching these forums, I've tried a few ideas to see if anything could help. For example, I understand that WPTools tries to mesh the size difference between the screen and printer fonts in order provide accurate "what-you-see-is-what-you-get" page editing. We found that when using the screen font exclusively, the cursor is always spot on with the insertion point, but obviously, this mode is unworkable when your application does printing.

    To give an example of what I'm talking about, start up the WordPad5 demo and hold down the "a" key on your keyboard to create a row of characters. As the a's are drawn across the screen, the cursor will start to drift some distance further in from the insertion point at the end of the line. The effects can be more or less pronounced depending on the characters pressed and the number of repetitions.

    Granted, this scenario is ridiculous because nobody would type a long string of a's while still creating a document of value. We are, however, receiving these complaints from customers that are working in more practical terms.

    Sometimes the cursor moves too far in from the end of the line, and sometimes the cursor moves too far out.

    What can we do to alleviate or fix this problem for our users?


    Thank you for your advise.

  • Hello Julian, and thank you for your fast response.

    I have always used the wpfUseKerning flag, but the cursor problems still remained.

    After clearing my head and returning to the problem, I found that I was setting the flag in the wrong place. I had always set the flag on the RichText control, but in my case I needed to set the flag on the RTFData object instead.

    I am using a different RTFData object from the one created with the RichText control, so although I was doing everything right, I was in fact, doing everything wrong! :)

    I think everything is working great now. I will let you know if that changes.

    Thanks.