By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,507 Members | 1,185 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,507 IT Pros & Developers. It's quick & easy.

Changing the Text in TextBox- Letter by letter- what am i doing wr

P: n/a
Hi,

i'm writing this question again, since i didn't get an answer in the reply i
wrote, i hope it's ok.

My user default language is hebrew and in some specific TextBoxs i want that
the default language will be english. I asked here and the answer i got was
that the best way to do so, is by getting the Hebrew Letter and Change it to
it's parallel English letter on the keyboard.
i didn't such a function (with switch and case) but i'm having problem with
the event who calles that function, i can't make the textBox to
display the text right.
this is my function:

private void neshek_num_txt_KeyUp(object
sender,System.Windows.Forms.KeyEventArgs e)
{
if(e.KeyCode!=Keys.Enter && e.KeyCode!=Keys.Alt && e.KeyCode!=Keys.Tab)
{
string temp=neshek_num_txt.Text.Trim();
string let="";
int len=temp.Length;
string new_line="";
if(len>0)
let=mf.Change_Langauge(temp[len-1].ToString());
for(int i=0;i<len-1;i++)
new_line=new_line+temp[i].ToString();
new_line=new_line+let;
neshek_num_txt.Text=new_line;

}

}

the function Change_Langauge() gets the hebrew letter and returns the
parallel letter on the keyboard.
my problems are:
1. sometimes it takes the computer lots of time to respond (like it gets
into a loop) and only by hiting ctrl+akt+del releases it.
2. if i pressed C and Z i get only the hebrew letter of Z.

what is wrong with my function? how can i make the cursor to be at the end of
the line?

Thanks,

Nov 17 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.