fingers
Programmer
- Nov 17, 2000
- 17
I have 125 textboxes each limited to one character broken into 5 lines of 25. The indexes are 0-124. Object is to write words/sentences continuously and program will do the word wrapping. At each space, I check to see if there are enough boxes for the just-written word and if not, fill the remaining boxes with spaces and wrap the word to the next line.
My problem is, after wrapping, the focus is not given to the correct box. What troubles me is - if I put a breakpoint in and single step through the wrapping process, everything works fine and focus is given to the box after the wrapped word and space. However, when I just execute the routine, focus is placed several boxes before the correct one, thus erasing a letter from the wrapped word.
I have double and triple checked my textboxes and their index values. All are consecutive from 0 to 124. My code, for instance, after wrapping a word will specify sending focus to index 59 and textbox(56) will receive it. Yet, single stepping through the same code, index 59 is specified and textbox(59) gets it.
Does anyone have any idea why code will work single-steping and not work during regular execution?
My problem is, after wrapping, the focus is not given to the correct box. What troubles me is - if I put a breakpoint in and single step through the wrapping process, everything works fine and focus is given to the box after the wrapped word and space. However, when I just execute the routine, focus is placed several boxes before the correct one, thus erasing a letter from the wrapped word.
I have double and triple checked my textboxes and their index values. All are consecutive from 0 to 124. My code, for instance, after wrapping a word will specify sending focus to index 59 and textbox(56) will receive it. Yet, single stepping through the same code, index 59 is specified and textbox(59) gets it.
Does anyone have any idea why code will work single-steping and not work during regular execution?