By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,795 Members | 1,251 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,795 IT Pros & Developers. It's quick & easy.

What event fires when data is typed into a field?

P: n/a
foo
Hello,

What event will fire when a user types data into a field and then the field
loses the focus but does not fire when a field is filled programatically? I
don't want the event to run when I'm initializing the field via code, but
the Change Event fires regardless of how the field was changed.

Thanks,

Bill Nicholson
Cincinnati, OH USA
Nov 20 '05 #1
Share this Question
Share on Google+
9 Replies


P: n/a
Cor
Hi Foo,

About what kind of field are you talking in a textbox, datagrid, combobox,
listview etc. etc?

Cor
What event will fire when a user types data into a field and then the field loses the focus but does not fire when a field is filled programatically? I don't want the event to run when I'm initializing the field via code, but
the Change Event fires regardless of how the field was changed.

Nov 20 '05 #2

P: n/a
foo
textbox
"Cor" <no*@non.com> wrote in message
news:um**************@tk2msftngp13.phx.gbl...
Hi Foo,

About what kind of field are you talking in a textbox, datagrid, combobox, listview etc. etc?

Cor
What event will fire when a user types data into a field and then the field
loses the focus but does not fire when a field is filled programatically? I
don't want the event to run when I'm initializing the field via code,

but the Change Event fires regardless of how the field was changed.


Nov 20 '05 #3

P: n/a
Cor
Hi Foo,

Then there are a lot of events I like the most the keyup for typing

Than you have the leave for the second situation you said.

I hope this helps,

Cor
What event will fire when a user types data into a field and then the

field
loses the focus but does not fire when a field is filled programatically?
I
don't want the event to run when I'm initializing the field via code,

but the Change Event fires regardless of how the field was changed.

Nov 20 '05 #4

P: n/a
* "foo" <fo*@foo.com> scripsit:
textbox


'KeyPress', 'KeyDown', 'KeyUp', 'TextChanged'.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #5

P: n/a
Cor
Hi Herfried,

I thought not textChanged, does that not fire when it happens
programmaticly?

Cor

'KeyPress', 'KeyDown', 'KeyUp', 'TextChanged'.

Nov 20 '05 #6

P: n/a
* "Cor" <no*@non.com> scripsit:
I thought not textChanged, does that not fire when it happens
programmaticly?


Why not try it yourself?

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #7

P: n/a
Cor
Hi Herfried,

This was the question from the OP
-------------
What event will fire when a user types data into a field and then the field
loses the focus but does not fire when a field is filled programatically? I
don't want the event to run when I'm initializing the field via code, but
the Change Event fires regardless of how the field was changed.
-------------
This the answer from Herfried

'TextChanged'.
--------------
On my question if that was right you gave this answer
Why not try it yourself?

--------------
In my opinion this is not an answer to someone who ask a question, but if it
is your style, do it. I have never threath you like this and I never will.

But I did try it and I expect an answer what was the result when you did try
this?

\\\
Private Sub TextBox1_TextChanged(ByVal _
sender As Object, ByVal e As System.EventArgs) Handles
TextBox1.TextChanged
Me.BackColor = Color.Red()
End Sub

Private Sub Form1_Load(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
Me.TextBox1.Text = "To help Herfried a little bit"
End Sub

Private Sub TextBox1_KeyUp(ByVal sender As Object, _
ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyUp
Me.BackColor = Color.Blue
End Sub
///

Cor
Nov 20 '05 #8

P: n/a
* "Cor" <no*@non.com> scripsit:
In my opinion this is not an answer to someone who ask a question, but if it
is your style, do it. I have never threath you like this and I never will.


Sorry, my newsreader didn't show the OP's message, it seems to be too
old for my newsreader to be displayed... So I missed that the event
should not be fired when changing the textbox's content
programmatically.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #9

P: n/a
Cor
Accepted
:-)
In my opinion this is not an answer to someone who ask a question, but if it is your style, do it. I have never threath you like this and I never
will.
Sorry, my newsreader didn't show the OP's message, it seems to be too
old for my newsreader to be displayed... So I missed that the event
should not be fired when changing the textbox's content
programmatically.

Nov 20 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.