Why the label.text is not showing up?

G

Guest

I'm working with a Window based application. I have a small form with just 1
label control which is set as Enabled and Visible. Its text is in black
telling users to please wait while application is updating DB. However, the
form pops up but the label.text is hot showing at all. What should I check
to make this work?

Thanks, Alpha
 
J

Jon Skeet [C# MVP]

Alpha said:
I'm working with a Window based application. I have a small form with just 1
label control which is set as Enabled and Visible. Its text is in black
telling users to please wait while application is updating DB. However, the
form pops up but the label.text is hot showing at all. What should I check
to make this work?

Could you post a short but complete program which demonstrates the
problem?

See http://www.pobox.com/~skeet/csharp/complete.html for details of
what I mean by that.

Are you by any chance updating the text property and then doing a lot
of work all in the UI thread? Or perhaps updating the text property
from a different thread?

See http://www.pobox.com/~skeet/csharp/threads/winforms.shtml
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top