autosize of label is not working
Hi,
I am using Visual Studio 2005 and DotNet 2
I have the following code:
private System.Windows.Forms.Label tempLabel;
private System.Windows.Forms.Label label; //declaration.
this.label = new System.Windows.Forms.Label(); //initialization in constructor
this.tempLabel = new System.Windows.Forms.Label();
this.tempLabel.AutoSize = true;
this.label.Location = new System.Drawing.Point( 10,10 );
this.label.Name = "mylabel;
this.label.Text = "Remember password on this computer:";
this.tempLabel.Text = this.label4.Text;
.
.
.
Now when I display the width of tempLabel......its always showing 100 irrespective of label size.
Can any one tell me why tempLable is size always 100 inspite of setting autosize=true;
regards,
satya