ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> python-tutor
python-tutor
Re: [Tutor] MineSweeper
by Alan G other posts by this author
Jun 26 2005 1:18AM messages near this date
Re: [Tutor] filtering a webpage for plucking to a Palm | [Tutor] Alternative File I/O for Tuples
>  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.

_______________________________________________
Tutor maillist  -  Tutor@[...].org
http://mail.python.org/mailman/listinfo/tutor

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved