Newbie needs help with TextBox 
Author Message
 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  
 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  
 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  
 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  
 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  
 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  
 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  
 
 [ 7 post ] 

 Relevant Pages 

1. Newbie Needs Help on Textbox

2. Newbie needs help with Loop to textBox

3. Need Report to look at SQL Data source ( VB / CR newbie needs help)

4. Help! Need help with TextBox Cntrl

5. Newbie Help ...Adding TextBoxes At RunTime

6. VB4 newbie help: Reading a real into a textbox

7. Newbie needing help badly!! Please help

8. HELP! Newbie needs help with SQL for VB3

9. Please Help Newbie Crystal Report / VB help needed.

10. HELP - Newbie needs help on simple problem!

11. Newbie needs help running help file

12. Help..Newbie needs help with collections...and arrays

 

 
Powered by phpBB® Forum Software