|
-
Feb 18th, 2013, 02:45 PM
#19
Hyperactive Member
Re: [RESOLVED] Label does not refresh on load
 Originally Posted by TysonLPrice
I see what you mean by different and I did blow that but I don't see how that confused anyone, they didn't know about it then. The behavior is the same using the OP's scenario and inferred's explanation is actually what is happening in both cases.
On Tek-Tips the text in Texbox1 fires the change event. Textbox2 will get values because it is empty. Label4 will populate or not based on if it has a value. Textbox2 behaves the same way in that if it has text at design time it will not load either.
So the reason for the behavior is what inferred posted and was arrived at from my post.
All the same I did translate the issue from one post to the other incorrectly 
If you look at your OP you will see that you made the same mistake again. What you was inferring with your code was that you wanted to change the text of text2 and label4 in the text2_textchanged event. That would create an infinite loop. That is why it was questioned as to why you were changing the text of a textbox inside its own text_change event.
The question now makes sense after seeing the other forum post.
Just another thing, as mentioned above, if the label was put on the form first then the problem wouldn't have occurred. However there is a way to get around it without having to empty the contents of label4
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|