G
Guest
I'm developing a quite comlex form containing a user control in C#
In the user control I'm trying to set a simple label to be visible:
labelState.Visible = true;
The debugger showns me, that the labelState.Visible is false
before entering this line of code.
But it is still false after this line of code!!!
Can anyone please explain, how this can happen?
I have double checked that I have not defined an event on this label that
resets the value to false.
Is there any posiible condition that does not allow to set a label's
visibility to true?
Regards
Burkhard Mahr
-------------------------
Label Initialization Code:
this.labelState.Anchor =
((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top |
System.Windows.Forms.AnchorStyles.Right)));
this.labelState.BackColor = System.Drawing.Color.Transparent;
this.labelState.Font = new System.Drawing.Font("Microsoft Sans Serif",
8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point,
((System.Byte)(0)));
this.labelState.Location = new System.Drawing.Point(870, 4);
this.labelState.Name = "labelState";
this.labelState.Size = new System.Drawing.Size(44, 16);
this.labelState.TabIndex = 16;
this.labelState.Text = "Status";
In the user control I'm trying to set a simple label to be visible:
labelState.Visible = true;
The debugger showns me, that the labelState.Visible is false
before entering this line of code.
But it is still false after this line of code!!!
Can anyone please explain, how this can happen?
I have double checked that I have not defined an event on this label that
resets the value to false.
Is there any posiible condition that does not allow to set a label's
visibility to true?
Regards
Burkhard Mahr
-------------------------
Label Initialization Code:
this.labelState.Anchor =
((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top |
System.Windows.Forms.AnchorStyles.Right)));
this.labelState.BackColor = System.Drawing.Color.Transparent;
this.labelState.Font = new System.Drawing.Font("Microsoft Sans Serif",
8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point,
((System.Byte)(0)));
this.labelState.Location = new System.Drawing.Point(870, 4);
this.labelState.Name = "labelState";
this.labelState.Size = new System.Drawing.Size(44, 16);
this.labelState.TabIndex = 16;
this.labelState.Text = "Status";