label.visible

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a label that will not display. On the form load event I wrote
"label1.visible=false".
when my routine get at the end of the code I inserted "label1.visible=true".
I have had a similar problem with vba in excel and I had to put a wait
statement after telling the label.visible=true. This solved the problem in
Excel. In VB.Net I used the thread.sleep after telling the label.visble=true
and this did not help.

When I said "wait" I am only talking about 1 second the same for sleep.

Thanks for any help.
DCSTech
 
I created a new web project, and put a single label on it.

In page_load I can easily set visible=false or visible=true..and it works as
expected

Jeff
 
This is on a windows form.

Jeff Dillon said:
I created a new web project, and put a single label on it.

In page_load I can easily set visible=false or visible=true..and it works as
expected

Jeff
 
Can you explain your code a bit more or post a sample that illustrates the
problem?

ShaneB
 
I checked it in windows application and it is working fine for me.. May be
check some other page events handlers

regards
Nishith


Nishith
 
hi nishith,
i had the sample problem, on the form i had put a new label, and it was
not visible

There is a workaround, open the code for the winform
under the following tag
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
under the declaration of the label put this code

Me.<your Label>.ForeColor = System.Drawing.SystemColors.ControlText
You should be all set

Cheers
Sid
 
Back
Top