Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Randomly Moving Controls
Message
 
To
20/09/2000 15:02:54
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00418697
Message ID:
00418701
Views:
41
>How can I shuffle a set of command buttons(15) in a container. No two buttons can occupy the same coordinates. The coordinates have to be LEFT(2,32,62,92) TOP(2,32,62,92). Something similar to the puzzle in Fox 2.6. Thanks!

Set up an array of coordinates and make that a property of the container. MyArray(15,3)
1 - .top
2 - .left
3 - assigned

Set the container to default visible = .F. In the container's init, randomly assign the values from MyArray to each button until each element has been used. Use a FOR... ENDFOR to scan through the buttons.
I try to stay online, to get better information.
I try to get away from the office once in a while..
But they KEEP... PULLING.. ME.. BACK.. IN!!!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform