Newbie needs help with TextBox
Author |
Message |
Magi #1 / 7
|
 Newbie needs help with TextBox
I need help! Why does the cursor not ALWAYS start in the left most position when typing text in a TextBox? I've tried everything I can think of. I've got the MaxLength set in each TextBox to the length of a field in the database. But every time I type data in say, a TextBox with a MaxLength set to 15, I can only type 14 characters. The same for a TextBox set to 1. As soon as I try to type a character the bell rings and I can type nothing? I tried the following but the problem still exists. Private Sub Text1_GotFocus(Index As Integer) Text1(Index).SelStart = 0 End Sub Thanks, Magic
|
Fri, 16 Apr 2004 00:40:38 GMT |
|
 |
Magi #2 / 7
|
 Newbie needs help with TextBox
I need help! Why does the cursor not ALWAYS start in the left most position when typing text in a TextBox? I've tried everything I can think of. I've got the MaxLength set in each TextBox to the length of a field in the database. But every time I type data in say, a TextBox with a MaxLength set to 15, I can only type 14 characters. The same for a TextBox set to 1. As soon as I try to type a character the bell rings and I can type nothing? The only way I can type the correct amount of characters is to press the DELETE button on every TextBox before I start to type. I tried the following but the problem still exists. Private Sub Text1_GotFocus(Index As Integer) Text1(Index).SelStart = 0 End Sub Thanks, Magic
|
Fri, 16 Apr 2004 00:45:44 GMT |
|
 |
Val #3 / 7
|
 Newbie needs help with TextBox
| I need help! | Why does the cursor not ALWAYS start in the left most position | when typing text in a TextBox? I've tried everything I can think | of. I've got the MaxLength set in each TextBox to the length | of a field in the database. But every time I type data in say, | a TextBox with a MaxLength set to 15, I can only type 14 characters. | The same for a TextBox set to 1. As soon as I try to type a character | the bell rings and I can type nothing? | The only way I can type the correct amount of characters is to press | the DELETE button on every TextBox before I start to type. | | | I tried the following but the problem still exists. | | Private Sub Text1_GotFocus(Index As Integer) | | Text1(Index).SelStart = 0 | | End Sub | | Thanks, | | Magic | That code does set the caret to the zero possition. As far as hitting delete first, are you deleting text already residing in the text boxes?, if so, your max length is already taken up with text in the text boxes, and thats what it should behave like. Put it this way, if your text boxes are set to a max length and there is text residing in your text boxes equal to max length, then no, you won't be able to type in any more text. Please explain exactly what it is your trying to do, and I or others here will try to help. Good luck. Chris Val
|
Thu, 15 Apr 2004 21:59:13 GMT |
|
 |
Magi #4 / 7
|
 Newbie needs help with TextBox
Thanks for your help Chris, The TextBox are not bound. Maxlength = 15. I can only type 14 characters before the bell rings and can not type anymore. If I press the Delete Key, THEN I can type the full 15 characters. Magic On Mon, 29 Oct 2001 00:59:13 +1100, "Chris \( Val \)" Quote:
>| I need help! >| Why does the cursor not ALWAYS start in the left most position >| when typing text in a TextBox? I've tried everything I can think >| of. I've got the MaxLength set in each TextBox to the length >| of a field in the database. But every time I type data in say, >| a TextBox with a MaxLength set to 15, I can only type 14 characters. >| The same for a TextBox set to 1. As soon as I try to type a character >| the bell rings and I can type nothing? >| The only way I can type the correct amount of characters is to press >| the DELETE button on every TextBox before I start to type. >| >| >| I tried the following but the problem still exists. >| >| Private Sub Text1_GotFocus(Index As Integer) >| >| Text1(Index).SelStart = 0 >| >| End Sub >| >| Thanks, >| >| Magic >| >That code does set the caret to the zero possition. >As far as hitting delete first, are you deleting text already residing >in the text boxes?, if so, your max length is already taken up with >text in the text boxes, and thats what it should behave like. >Put it this way, if your text boxes are set to a max length and there >is text residing in your text boxes equal to max length, then no, you >won't be able to type in any more text. >Please explain exactly what it is your trying to do, and I or others >here will try to help. >Good luck. >Chris Val
|
Fri, 16 Apr 2004 23:14:27 GMT |
|
 |
Jan Hy #5 / 7
|
 Newbie needs help with TextBox
on Mon, 29 Oct 2001 15:14:27 GMT bearing the following fruit: Quote: >Thanks for your help Chris, >The TextBox are not bound. Maxlength = 15. >I can only type 14 characters before the bell rings >and can not type anymore. If I press the Delete Key, >THEN I can type the full 15 characters. > Magic
There must be a space in the textbox before you begin typing. Quote: >On Mon, 29 Oct 2001 00:59:13 +1100, "Chris \( Val \)"
>>| I need help! >>| Why does the cursor not ALWAYS start in the left most position >>| when typing text in a TextBox? I've tried everything I can think >>| of. I've got the MaxLength set in each TextBox to the length >>| of a field in the database. But every time I type data in say, >>| a TextBox with a MaxLength set to 15, I can only type 14 characters. >>| The same for a TextBox set to 1. As soon as I try to type a character >>| the bell rings and I can type nothing? >>| The only way I can type the correct amount of characters is to press >>| the DELETE button on every TextBox before I start to type. >>| >>| >>| I tried the following but the problem still exists. >>| >>| Private Sub Text1_GotFocus(Index As Integer) >>| >>| Text1(Index).SelStart = 0 >>| >>| End Sub >>| >>| Thanks, >>| >>| Magic >>| >>That code does set the caret to the zero possition. >>As far as hitting delete first, are you deleting text already residing >>in the text boxes?, if so, your max length is already taken up with >>text in the text boxes, and thats what it should behave like. >>Put it this way, if your text boxes are set to a max length and there >>is text residing in your text boxes equal to max length, then no, you >>won't be able to type in any more text. >>Please explain exactly what it is your trying to do, and I or others >>here will try to help. >>Good luck. >>Chris Val
|
Fri, 16 Apr 2004 20:39:23 GMT |
|
 |
Val #6 / 7
|
 Newbie needs help with TextBox
| Thanks for your help Chris, | The TextBox are not bound. Maxlength = 15. | I can only type 14 characters before the bell rings | and can not type anymore. If I press the Delete Key, | THEN I can type the full 15 characters. | | Magic [SNIP] Magic. I just read Jan's reply and agree with her suggestion that you have a space in there. Try this out: Multi - Select the problem TextBoxes by dragging over them and in your properties window (The Text Property), make sure there are no spaces in there (Hit the back space key), and then run your program again. Good luck. Chris Val
|
Fri, 16 Apr 2004 22:04:26 GMT |
|
 |
Magi #7 / 7
|
 Newbie needs help with TextBox
Thanks for your help Chris, These TextBoxes are for APPEND. They are blank to start with. The TextBox are not bound. Maxlength = 15. I can only type 14 characters before the bell rings and can not type anymore. If I press the Delete Key before I type, THEN I can type the full 15 characters. Magic On Mon, 29 Oct 2001 00:59:13 +1100, "Chris \( Val \)" Quote:
>| I need help! >| Why does the cursor not ALWAYS start in the left most position >| when typing text in a TextBox? I've tried everything I can think >| of. I've got the MaxLength set in each TextBox to the length >| of a field in the database. But every time I type data in say, >| a TextBox with a MaxLength set to 15, I can only type 14 characters. >| The same for a TextBox set to 1. As soon as I try to type a character >| the bell rings and I can type nothing? >| The only way I can type the correct amount of characters is to press >| the DELETE button on every TextBox before I start to type. >| >| >| I tried the following but the problem still exists. >| >| Private Sub Text1_GotFocus(Index As Integer) >| >| Text1(Index).SelStart = 0 >| >| End Sub >| >| Thanks, >| >| Magic >| >That code does set the caret to the zero possition. >As far as hitting delete first, are you deleting text already residing >in the text boxes?, if so, your max length is already taken up with >text in the text boxes, and thats what it should behave like. >Put it this way, if your text boxes are set to a max length and there >is text residing in your text boxes equal to max length, then no, you >won't be able to type in any more text. >Please explain exactly what it is your trying to do, and I or others >here will try to help. >Good luck. >Chris Val
|
Sun, 18 Apr 2004 23:14:55 GMT |
|
|
|