471,599 Members | 1,649 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,599 software developers and data experts.

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

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
0 1527

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Tony W | last post: by
1 post views Thread by Paul M. Frazier, Ph.D. | last post: by
2 posts views Thread by Dave | last post: by
reply views Thread by Luis Esteban Valencia | last post: by
6 posts views Thread by Brandon McCombs | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.