473,382 Members | 1,202 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Text from one textbox to the other

Hello peeps,

does anyone have a code snippet, to get the text running from one textbox into another?

eg.

txtBox 1 = 2 characters
txtBox 2 = 6 characters

total text = pilotfine

but as soon as i get to the end off txtBox 1 and press letter "L" it beeps instead of moving over to the txtBox 2 and if i press letter "L" again then only does it go over to txtBox 2.

Hope this post is not to wierd or confusing.
Nov 14 '08 #1
7 1187
r035198x
13,262 8TB
Congratulations! You have just won the WPOTDC(*), stay tuned for details.

Are you talking about changing focus from one textbox to another or copying text from one textbox to another?

(*) Weirdest post of the day contest.
Nov 14 '08 #2
As you type in the needed text in must first insert the 2 characters in the first txtBox then the rest in the second txtBox, So ja i think change focus :P
Nov 14 '08 #3
r035198x
13,262 8TB
Why would you want to do that? Rather limit the first textbox to two characters only. Then when the user has entered the two characters, they can move to the next textbox and enter the rest of the text.

If you want to continue with your other (weird) approach, you can put a key typed (or pressed not sure which one) on the first textbox. The event does nothing when there are less than two characters. After two characters are reached, it then removes whatever has been typed and appends it to the second textbox.
Nov 14 '08 #4
I hear what you are saying, Let me be a little clearer.
I am obviously a junior developer so please bare with me :D

i need to enter coordinates that will be used to locate an area on a map.
i have a dot after the first two integers, so i want to enter the first to values then the Focus must move to the next text box. i separated the the coordinates with the two text boxes to have a dot txtLable in between. This is the way i was told to do it.

thanks for all the quick responses.
Nov 14 '08 #5
r035198x
13,262 8TB
OK then, that's easy enough. So in your first textbox1's TextChanged event, you
do something like this
Expand|Select|Wrap|Line Numbers
  1. string text = textBox1.Text;
  2. if(text.Length == 2) {
  3.    textBox2.Focus();
Nov 14 '08 #6
Yes that did it thanks a lot, i was not sure which event i was supposed to use.
Anyhow thanks for the help and enjoy the rest of the day.........
after all it is FRIDAY BABEEEE
Nov 14 '08 #7
r035198x
13,262 8TB
Y..
after all it is FRIDAY BABEEEE
Yes, if Mary had not recovered from her flu and come back we'd all be having a party today.
Nov 14 '08 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Suresh Kumaran | last post by:
Hi All, Does anybody know the sytax in VB.NET to write the contents of a multiline text box to a text file? Appreciate help. Suresh
5
by: Steve S | last post by:
Heres what I want to do...User types into a texbox, clicks a button, the button saves that text to a file. The problem is that when I click the submit button, any changes made to the textbox are...
11
by: Ron L | last post by:
I have a barcode scanner which uses a "keyboard wedge" program so that the data it scans comes through as if it was typed on a keyboard. I am trying to have the data in the barcode be displayed in...
5
by: CCLeasing | last post by:
Hello, I have searched google but can not find a straight forward answer to my problem. Hopefuly someone will be kind enough to offer their expertise. Please forgive if this seems a bit convoluted...
6
by: rn5a | last post by:
When the EditCommandColumn in a DataGrid is clicked, all the BoundColumns get replaced by TextBoxes so that users can alter the data. By default, the Text in the TextBoxes are left-aligned. Is...
16
by: mj.redfox.mj | last post by:
Can anyone help? I have a textbox which I'm programatically adding by using the following code: txtTest = New TextBox txtTest.ID = "txtLeft" + cntCount.ToString...
4
by: Neil | last post by:
Just found out that the Microsoft Rich Textbox does not support full text justification, since it's based on Version 1.0 of the RichEdit Window Class, and full text justification is only available...
16
by: Neil | last post by:
I posted a few days ago that it seems to me that the Access 2007 rich text feature does not support: a) full text justification; b) programmatic manipulation. I was hoping that someone might...
8
by: Jeanette White | last post by:
I am trying to create a custom validator to validate that if "Other" is selected from a drop downdown list then a textbox is displayed and a comment is required. The display textbox piece is...
6
by: SenthilVel | last post by:
hi all, i am running a ASP.Net 2.0 application. in one of the pages i have a text box which is set as PASSWORD mode. when the page is submitted or transfered , am not able to get the contents of...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.