From: Michael S. <mik...@ya...> - 2005-05-10 20:39:48
|
Attached is my latest attempt at a simple layout manager. Once again, it is based on anchors with automatic partitioning of the background into a grid based on the positioning of expandable components. Major changes from the previous attempt include: 1) number of partitions minimised 2) adding it to your applications is simplified >>import anchors add line to on_initialize >>self.panel.layoutManager = anchor.GridAnchorLayout(self.components) 3) can now anchor so relative position of component to both sides is held constant (component size does not change) An example is attached. If anyone has a pythoncard example where they have used wx sizers, see if this method can replicate the result. Alternatively, send the code to me and I will give it a go. I think that this method would be enhanced if it could be complemented with an easy means of using splitter windows (the split would not need to be visible or user adjustable). This method divides the background into a grid. In some/many cases different parts of the background should have separate grids. This method deals with resizing/repositioning of the components with a change in the background size. It does not deal with changes as a result of font size changes. Thanks to Alex for his help. Cheers, Michael Find local movie times and trailers on Yahoo! Movies. http://au.movies.yahoo.com |