Appending text
-
Normally when we using 'Appendtext' method of a text box, the text will append to end of existing text in the text box. But i want to know that is there method to append text to specific location of a text box. As a example i have two text boxes named text1 and text2. When i am typing in textbox1, the text will append to textbox2 as same time. Now i want to append this text to textbox2 to the specific location (to beginning or to middle or somewhere) not to end. I hope your kind reply and sorry for my bad english.
-
Normally when we using 'Appendtext' method of a text box, the text will append to end of existing text in the text box. But i want to know that is there method to append text to specific location of a text box. As a example i have two text boxes named text1 and text2. When i am typing in textbox1, the text will append to textbox2 as same time. Now i want to append this text to textbox2 to the specific location (to beginning or to middle or somewhere) not to end. I hope your kind reply and sorry for my bad english.
-
You need the
String.Insert
method.50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!
thank you d@nish for your fast reply. I have another question. when we change cursor location of a text box, how can I get cursor location as a number. As a example when i put cursor beginning of the text or any other location i want to get a value indicating cursor location.( When I put the cursor beginning of the text then the cursor location will be 0, and when I put the cursor end of the text then the cursor location will be length of the text)
-
thank you d@nish for your fast reply. I have another question. when we change cursor location of a text box, how can I get cursor location as a number. As a example when i put cursor beginning of the text or any other location i want to get a value indicating cursor location.( When I put the cursor beginning of the text then the cursor location will be 0, and when I put the cursor end of the text then the cursor location will be length of the text)
There is a thing called documentation; you can retrieve it easily by entering the class name of interest and maybe the word MSDN into the Google search box. Read and learn, don't ask the world to spoon feed you. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
-
There is a thing called documentation; you can retrieve it easily by entering the class name of interest and maybe the word MSDN into the Google search box. Read and learn, don't ask the world to spoon feed you. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
-
Good. Now discover the world, and come back when you have harder questions! :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages