I've coded Life in Java. I used a canvas and drew a bunch of images on that canvas. I also had a version that just drew squares on that canvas. Then I captured mouse events to permit the user to make the cells alive or dead. I can't say if my way is any better than any other way, but it worked for me.
Best Regards, -jj On Thu, Jun 05, 2003 at 10:35:00AM +0200, Antoon Pardon wrote: > > Well I'm still experimenting both with pygtk as well as with wxpython. > > The following question I have about programming with a gui toolkit > however is independant of the toolkit used, so I put it to both > lists. > > The next thing I would like to try is a program like life, mine sweeper, > or griddler (aka nonogramm or paint by number). Basically this kind > of program requires a table all with similar data. However this table > could become quite large so I am a bit hesistant in implementing this > as a gtk_table/GridSizer, filled with thousands of widgets. > > An alternative would be to have just one widget in which I draw al > elements as they should be, but this would be a little harder to > code. > > So what are your ideas? Shouldn't I worry about having thousand > of widgets? Is there some kind of limit I should stay under? > Is there an other approach I didn''t think of. -- Hacker is to software engineer as Climbing Mt. Everest is to building a Denny's there. _______________________________________________ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
