[Tkinter-discuss] self modifying buttons - memory game
RickB
brewerofbeer at hotmail.com
Mon May 28 22:46:25 CEST 2007
Cameron Laird-2 wrote:
>
> On Fri, May 04, 2007 at 01:09:08PM -0700, RickB wrote:
> .
> .
> .
>> I assume there is probably a better way to do this. The code is
>> functional
>> but its really slow if you have a large amount of buttons.
>> http://www.nabble.com/file/8220/gui.py gui.py
> .
> .
> .
> I suspect you are indeed working too hard.
>
> When I execute the "gui.py" source, I see a 6 x 5 grid of buttons.
> They all appear active, but there are no random color changes
> evident, as I suspect you intended. What's the effect you're after?
> My guess is that we can help you achieve it far more economically.
> I've scanned the source, but I don't get the point.
> _______________________________________________
> Tkinter-discuss mailing list
> Tkinter-discuss at python.org
> http://mail.python.org/mailman/listinfo/tkinter-discuss
>
>
I edited the original message. I don't know how this mailing list stuff
works or if you guys got the edit or what. I am viewing it through
nabble.com. I posted a new file in my edit:
http://www.nabble.com/file/8227/gui2.py
It is just a version of a memory game where you have a grid of cards and you
have to pick a matching pair. If you click the one of buttons in the grid
you will see a color. You then must click a button with a matching color. If
you do both those buttons will stay that color. If your second pick does not
match, both buttons turn back to gray. I think my new file is pretty
efficient and functional.
Thanks for the interest anyway,
Rick
--
View this message in context: http://www.nabble.com/self-modifying-buttons---memory-game-tf3693914.html#a10844147
Sent from the Python - tkinter-discuss mailing list archive at Nabble.com.
More information about the Tkinter-discuss
mailing list