[Tutor] MineSweeper

Alan G alan.gauld at freenet.co.uk
Sun Jun 26 10:19:19 CEST 2005


> How do I know which button did I click when all buttons have the
same name?

Put them in a matrix.
ie a list of lists. Then refer to them by their position inthe lists
so that the top left button is "buttons[0][0]" etc

This is also how you dynamically create your screen,
just iterate over the list to create and pack/grid/place
each button.

HTH,

Alan G.



More information about the Tutor mailing list