Sorry I won't be posted code on this post. Please forgive me.
So I have a tab control and on that tab control I have labels are populated with text from and XML file. On load the data shows but once I do some actions and that text file gets updated my labels won't update unless I tab out then tab back in. I want them to update after my actions are completed.
There are buttons on my User Control that allow me the run through my program and update this text file, but when I dispose those and go back to my 'main screen' my labels are not updated on the UI. I have tried to use Invalidate, refresh, update and even Application.DoEvents. Which I know is bad practice but at this point I have no idea how to make this work. Please help. Thank you.
When you read out the text in your text file, the resulting string is not an alias for the contents of the file; it is a snapshot of what the contents were when you read out the string.
An example would be two integers:
Int
bwould still be equal to1, since that was whatawas whenawas assigned tob;bdoes not change witha.I would say that this is a fairly common beginner misconception. Just because you assigned
atobdoesn't necessarily mean thatbwill continue to equalain the future.