Page 1 of 1
Buttons
Posted: Wed Aug 22, 2012 12:50 pm
by daoa80
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,
Re: Buttons
Posted: Wed Aug 22, 2012 1:05 pm
by mark.monroe
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;