Problem with custom textbox using C#

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ashraf01
    New Member
    • Aug 2010
    • 1

    #1

    Problem with custom textbox using C#

    I have crated my own textbox control drawing on a canvas using C# langauage without inheriting any C# control. I draw all the string even cursor.

    The input char in this control is with a keymapping from keyboard. When user press '1' it will inputted a japanese char. when press '2' another japanese char and so on.

    The problem what I faced is that, when the length of string in the control is greater then 10-15, all characters are little moving(as like as dancing all the characters for each input char).Could anyone tell me plz why this is happening.

    Thanks in advance.
  • GaryTexmo
    Recognized Expert Top Contributor
    • Jul 2009
    • 1501

    #2
    I assume that when you draw the text, you're using some kind of position variable to decide where it goes, yea? Is there any way this variable could be changing and if so, based on what?

    Throw some debug statements in your code to try and determine what's changing when the length gets too long.

    There's not much else we can do without some code. Instead of posting your full program, perhaps try to reproduce this in a smaller project, maybe one that just paints some preset text. See if that has the same issue and go from there?

    Comment

    Working...