I have a problem
I made a grid of buttons (6,6)
but now i want to give some of the buttons a different color.
i dont know how because i made the buttons with a for loop ofcourse
Printable View
I have a problem
I made a grid of buttons (6,6)
but now i want to give some of the buttons a different color.
i dont know how because i made the buttons with a for loop ofcourse
If the buttons are in an array, you can access them by using indexes.
This element of the array: theArray[row][col] is a button and can be used to call button methods:
theArray[row][col].aButtonMethod()
right now, they are in a forloop
The array would need to be defined outside of a method if you want other methods to be able to access it.