K
Keith Smith
What am I missing? I am trying to dynamically create a button...
Button myButton = new Button();
myButton.Name="ButtonX";
Button myButton = new Button();
myButton.Name="ButtonX";
Keith said:What am I missing? I am trying to dynamically create a button...
Button myButton = new Button();
myButton.Name="ButtonX";
Keith Smith said:What am I missing? I am trying to dynamically create a button...
Button myButton = new Button();
myButton.Name="ButtonX";
myButton.Location = new Point(8,8);
myButton.Text = "Click me";
this.Controls.Add(myButton); // Adds the button to the form (if you put
this code e.g. in the constructor or better in InitializeComponent)
Keith Smith said:myButton.Location = new Point(8,8);
myButton.Text = "Click me";
this.Controls.Add(myButton); // Adds the button to the form (if you put
this code e.g. in the constructor or better in InitializeComponent)
Thanks alot, Michael!
I forgot to mention this earlier.... How can I make an "array" of these
buttons as well? Would it be sometime like this...?
Button myButton = new array[10]