From: Robin D. <ro...@al...> - 2002-03-07 19:19:10
|
> > Question 1) > =========== > > We have made a demo app that has a panel and on that a wxNotebook and two > buttons. One button adds a page and creates a grid on it, the other deletes > the selcted page and thus removes the grid with it. > > The problem I have with the above senario is memory. I can create as many > pages as I wish and thus as many grids but when I delete/remove the pages > the grids are still floating around in memory even though they're not > displayed and after a time the application acts like a sponge and my system > gets slower and slower. The C++ Window objects are normally deleted when their parent is closed/deleted. Tn the case of wxNotebook calling DeletePage will also delete the C++ window object while RemovePage will not. Usually when the C++ object is deleted the Python object will be too, unless of course if you are holding extra references to it or there is a circular reference somewhere. Try reducing your app to a as small as possible sample that has the same problem and perhaps you will discover the cause of the problem along the way. If not then you have something to share with others so they can help you track it down. > > Question 2) > =========== > > Is it possible to print a wxGrid to a standard printer? If so some demo > code would be appreciated so I can perform this function. I don't think I've seen anything to generically go straight from a grid to the printer, but perhaps you could dump your grid data to HTML using table tags and use the wxHtmlEasyPrinting class to print it. If this won't cut it for you then perhaps you should ask on the wxPython-users list to see if anybody has some ready made code for you, since these really aren't Boa questions. -- Robin Dunn Software Craftsman ro...@Al... Java give you jitters? http://wxPython.org Relax with wxPython! |