How do I align the text to center with the following code? Thanks.
Code:TextBox myLbl = new TextBox();
this.panel.Controls.Add(myLbl);
myLbl.Size = new Size(myWidth,myHeight);
myLbl.Location = new Point(myWidth*i,j * myHeight);
Printable View
How do I align the text to center with the following code? Thanks.
Code:TextBox myLbl = new TextBox();
this.panel.Controls.Add(myLbl);
myLbl.Size = new Size(myWidth,myHeight);
myLbl.Location = new Point(myWidth*i,j * myHeight);
myLbl.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
...why not just set the textbox's textalign property?
Thanks for the help.