It is possible to generate "X" number of buttons depending on a given randon number?
exe: randon number given is 2, consequently I will create 2 buttons.
?
Thanks,
Buttons
-
- Posts: 824
- Joined: Tue Mar 13, 2012 9:53 am
Re: Buttons
There is no way to generate buttons during runtime easily.
Using a script, you could show or hide a button and you could move the button around the screen. You could create 10 buttons, and then show/hide them based on your random number.
//Shows or hides a button
this.Button1.Visible = true;
//Position of the left side of the button
this.Button1.Left = 100;
//Position of the top of the button
this.Button1.Top = 100;
Using a script, you could show or hide a button and you could move the button around the screen. You could create 10 buttons, and then show/hide them based on your random number.
//Shows or hides a button
this.Button1.Visible = true;
//Position of the left side of the button
this.Button1.Left = 100;
//Position of the top of the button
this.Button1.Top = 100;
Best Regards,
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer