How can I create a grid/array of state buttons similar to those in minesweeper?

3 次查看(过去 30 天)
I want to create a grid of clickable buttons in App Designer. The program should create an N by M matrix of buttons, accordingly to a given variable´s dimensions (a matrix of ones and zeros). Each of these little squares would have a value "underneath" it. Clicking on a square, which holds a zero would paint the square green. Inversely, clicking on a square, which holds value "1" would paint the square red. I have already found some minesweeper-games created in matlab ( by Brian Moore and by Suleman Shafqat ), but I´m not sure, whether I can achieve building a matrix in design view, or should I just write the whole code for creating this grid into the code section? Can anybody help me with this issue?

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 MATLAB 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by