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

Why do my Label.Text values disappear?

P: n/a
I have a form with several labels on it that ae filled in through code but
for some reason the contents disappear. Does anyone have a guess as to what
might be happening?

Here is the part of the code where the problem occurs:

lblRunItem.Text = Item
txtCoilSpec.Text = CoilSpec
lblRunNo.Text = RunNo
lblOrdQty.Text = Qty
txtCore.Text = CGN
If CoreType = "I" Then

Single stepping thru the code and watching the "AUTO's" window I see the
lable contents being filled but when the code hits the "IF" test the contents
become an EMPTY STRING, why? The contents of all 3 labels disappear, the text
boxes are not impacted.

This code sets inside the KeyPress event of one of the text boxes on this
form. It makes no difference whether I add the "ME." on the front or not.
Nov 21 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Are they actually disapearing from the form itself or do they 'Appear' to
disapear when you are debugging. You have to remember that Auto's will
disapear "From View" in the auto's window when they go out of close scope,
it's one of the characteristics of autos window.

--
Terry Burns
http://TrainingOn.net
"Darrell Wesley" <Da***********@discussions.microsoft.com> wrote in message
news:A3**********************************@microsof t.com...
I have a form with several labels on it that ae filled in through code but
for some reason the contents disappear. Does anyone have a guess as to
what
might be happening?

Here is the part of the code where the problem occurs:

lblRunItem.Text = Item
txtCoilSpec.Text = CoilSpec
lblRunNo.Text = RunNo
lblOrdQty.Text = Qty
txtCore.Text = CGN
If CoreType = "I" Then

Single stepping thru the code and watching the "AUTO's" window I see the
lable contents being filled but when the code hits the "IF" test the
contents
become an EMPTY STRING, why? The contents of all 3 labels disappear, the
text
boxes are not impacted.

This code sets inside the KeyPress event of one of the text boxes on this
form. It makes no difference whether I add the "ME." on the front or not.

Nov 21 '05 #2

P: n/a
They actually disappear from the form.

"Terry Burns" wrote:
Are they actually disapearing from the form itself or do they 'Appear' to
disapear when you are debugging. You have to remember that Auto's will
disapear "From View" in the auto's window when they go out of close scope,
it's one of the characteristics of autos window.

--
Terry Burns
http://TrainingOn.net
"Darrell Wesley" <Da***********@discussions.microsoft.com> wrote in message
news:A3**********************************@microsof t.com...
I have a form with several labels on it that ae filled in through code but
for some reason the contents disappear. Does anyone have a guess as to
what
might be happening?

Here is the part of the code where the problem occurs:

lblRunItem.Text = Item
txtCoilSpec.Text = CoilSpec
lblRunNo.Text = RunNo
lblOrdQty.Text = Qty
txtCore.Text = CGN
If CoreType = "I" Then

Single stepping thru the code and watching the "AUTO's" window I see the
lable contents being filled but when the code hits the "IF" test the
contents
become an EMPTY STRING, why? The contents of all 3 labels disappear, the
text
boxes are not impacted.

This code sets inside the KeyPress event of one of the text boxes on this
form. It makes no difference whether I add the "ME." on the front or not.


Nov 21 '05 #3

P: n/a
I found the problem. Turns out the "txtCore" has a "TextChanged" event that
causing the problem.

Thanks.

"Terry Burns" wrote:
Are they actually disapearing from the form itself or do they 'Appear' to
disapear when you are debugging. You have to remember that Auto's will
disapear "From View" in the auto's window when they go out of close scope,
it's one of the characteristics of autos window.

--
Terry Burns
http://TrainingOn.net
"Darrell Wesley" <Da***********@discussions.microsoft.com> wrote in message
news:A3**********************************@microsof t.com...
I have a form with several labels on it that ae filled in through code but
for some reason the contents disappear. Does anyone have a guess as to
what
might be happening?

Here is the part of the code where the problem occurs:

lblRunItem.Text = Item
txtCoilSpec.Text = CoilSpec
lblRunNo.Text = RunNo
lblOrdQty.Text = Qty
txtCore.Text = CGN
If CoreType = "I" Then

Single stepping thru the code and watching the "AUTO's" window I see the
lable contents being filled but when the code hits the "IF" test the
contents
become an EMPTY STRING, why? The contents of all 3 labels disappear, the
text
boxes are not impacted.

This code sets inside the KeyPress event of one of the text boxes on this
form. It makes no difference whether I add the "ME." on the front or not.


Nov 21 '05 #4

P: n/a
Cool

--
Terry Burns
http://TrainingOn.net
"Darrell Wesley" <Da***********@discussions.microsoft.com> wrote in message
news:9D**********************************@microsof t.com...
I found the problem. Turns out the "txtCore" has a "TextChanged" event that
causing the problem.

Thanks.

"Terry Burns" wrote:
Are they actually disapearing from the form itself or do they 'Appear' to
disapear when you are debugging. You have to remember that Auto's will
disapear "From View" in the auto's window when they go out of close
scope,
it's one of the characteristics of autos window.

--
Terry Burns
http://TrainingOn.net
"Darrell Wesley" <Da***********@discussions.microsoft.com> wrote in
message
news:A3**********************************@microsof t.com...
>I have a form with several labels on it that ae filled in through code
>but
> for some reason the contents disappear. Does anyone have a guess as to
> what
> might be happening?
>
> Here is the part of the code where the problem occurs:
>
> lblRunItem.Text = Item
> txtCoilSpec.Text = CoilSpec
> lblRunNo.Text = RunNo
> lblOrdQty.Text = Qty
> txtCore.Text = CGN
> If CoreType = "I" Then
>
> Single stepping thru the code and watching the "AUTO's" window I see
> the
> lable contents being filled but when the code hits the "IF" test the
> contents
> become an EMPTY STRING, why? The contents of all 3 labels disappear,
> the
> text
> boxes are not impacted.
>
> This code sets inside the KeyPress event of one of the text boxes on
> this
> form. It makes no difference whether I add the "ME." on the front or
> not.
>
>


Nov 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.