On Apr 20, 5:29 pm, Alan G Isaac <alan.is...@gmail.com> wrote: > I need to display many (e.e., 2000) small squares whose colors are udpated > each time a computation is complete. > > One approach is to put rectangles on a single canvas. > Another approach is to put many canvases in a single frame. > Another approach is to create an image each iteration, > which is placed on a canvas. > Other? > > Are there obvious considerations in the choice? > (Right now I do not need to interact with the squares, > but in the future I may need to.) > > Thanks, > Alan Isaac
First of all, what GUI toolkit are you using? Secondly, in wxPython I would subclass wx.Panel and handle the EVT_PAINT event to just draw the rectangles. Generally I render to an off-screen DC and just blit that in the paint event. What kind of frame rate do you need? -- http://mail.python.org/mailman/listinfo/python-list