SteveQ2
asked on
VB6 How do I make 3 single line textboxes act like a split multi-line textbox?
I have a Visual Basic 6 form where there is a need for multi-line textbox functionality but the location of the controls do not allow for a multi-line textbox. The first textbox is near the right side of the screen. The second box is near a little lower and near the middle of the screen. The third text box is on the left side of the screen. Because the text is in different locations, I don't know of how I could use a multi-line textbox. How can I get the three textboxes to share text changes. For example, if textbox 1 has a maxlength of 10 and the user types in 15 characters, 10 characters should go into textbox1 and the next 5 characters should go into textbox2. If the user deletes 6 characters while textbox 2 has the focus, textbox2.text should change length to 0 and textbox1.text would change to len(9) and get the focus. .
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
AbhishekSharma and 23637269. Thank you very much for sharing your VB expertise! I was so stuck on the textboxes sharing text. I'm sorry to have to split the points. Abishek, your solution was great but every time I type a character the cursor returns to the front of the word. 23637269, your solution was also great. The scrolling forward works great but when I delete a character in textbox1 or 2, it doesn't scroll the text back from 2 or 3 as text is removed from an earlier box. I hope you don't think I'm criticizing either solution. II love them both. I'm only trying to explain why I couldn't give all of the points to one of you and not the other since both of your solutions are amazing. I was so so so stuck! I am so impressed that you both came up with such great solutions in such a short amount of time. 500 points to both of you if I could! Thank you! Thank you! Thank you!
ASKER
AbhishekSharma and 23637269. Thank you very much for sharing your VB expertise! I was so stuck on the textboxes sharing text. I'm sorry to have to split the points to 250 for each of you. Abishek, your solution was great but every time I type a character the cursor returns to the front of the word. 23637269, your solution was also great. The scrolling forward works great but when I delete a character in textbox1 or 2, it doesn't scroll the text back from 2 or 3 as text is removed from an earlier box. I hope you don't think I'm criticizing either solution. II love them both. I'm only trying to explain why I couldn't give all of the points to one of you and not the other since both of your solutions are amazing. I was so so so stuck! I am so impressed that you both came up with such great solutions in such a short amount of time. 500 points to both of you if I could! Thank you!
Hey! I clicked on Multiple Solutions and assigned 250 points to each of you. The system then gave me an error message saying permission to multiple solutions was denied. It then said Amishek had the accepted solution and 23637269 assisted the solution. That's incorrect. Both of your solutions were great. I'm sorry the system only gave you an assisted solution ranking Abishek. I also accepted your solution but the feedback system changed it to an assisted solution without asking me to confirm.
Hey! I clicked on Multiple Solutions and assigned 250 points to each of you. The system then gave me an error message saying permission to multiple solutions was denied. It then said Amishek had the accepted solution and 23637269 assisted the solution. That's incorrect. Both of your solutions were great. I'm sorry the system only gave you an assisted solution ranking Abishek. I also accepted your solution but the feedback system changed it to an assisted solution without asking me to confirm.
Your can use the keypress event or keydown or keyup event of the textbox to track how many chars have been entered. When you reach the max txtBox2.SetFocus, then txtBox3 etc...