From: Kevin A. <al...@se...> - 2001-09-02 23:41:51
|
> From: Peter Cleaveland > > I just started reading the list, and I noticed the discussion of "sizers" > to control the GUI appearance. I can sure see the cross platform > differences in widget rendering. What are sizers? (They sound like > something from the Java AWT - but I'm just guessing.) It's clear Yes, Java AWT and Swing support sizers as part of the layout manager. Originally, there was just the grid bag layout, but now Java supports box layout as well. HTML tables are another form of sizer layout. You can read up on sizers in the wxWindows documentation that came with your wxPython installation. In the "Classes by category" section look under 'Window layout' and then look at wxSizer, wxGridSizer, wxFlexGridSizer, etc. Everyone that wants to contribute ideas or code should read those sections. I haven't done much with "sizers" myself and in fact started reading up on the various forms today. It would be great if somebody can correct me where I made a mistake in my description above or better yet provide more insight into what wxWindows/wxPython does right or wrong with regards to sizers. After we are happy with our Font implementation I will be getting more into sizers. I already have an idea how we might implement them so that their description would be relatively easy to grasp. > Perhaps PythonCard could borrow some of the CSS syntax. Specifying > font-family as a list of requested fonts, falling to default if none are > available. Font-size and box/containment properties (border, padding, > margin, etc.) could be in pixels, but the actual width and height of most > things could fall where they may. Last week the font discussion centered around CSS-like syntax for the font family and facename. I didn't implement it yet because I'm still thinking about how the user (programmer) will need to manipulate the fonts in real programs versus initialization. At a minimum, there will always be a default family that must be specified: serif, sansSerif, monospace. CSS is too complicated for us to implement a complete-CSS syntax and I'm not sure that most of it applies anyway. I am much more interested in something like TABLE for our sizers, but done with Python lists and dictionaries instead of using tags like <TABLE> <TR> <TD> ... and then implementing dot notation to reference individual elements. However, I've only thought about this for a little while and my initial thoughts on the matter could be either too limited or difficult to implement or both. There is actually quite a lot of work going into the wxHTML control for wxWindows and even in the upcoming wxWindows/wxPython 2.3.2 it will be much more capable than the one available today. We won't be able to do a GUI layout editor that uses HTML, that is simply too complicated, but we will probably be able to support the use of HTML with embedded widgets for layouts sometime in the future if somebody wants to go that route. The layout capabilities won't be as advanced as what you can pull off with say Internet Explorer today, but if you're careful you will be able to do quite a lot and probably share layout between web pages and PythonCard apps. I keep reminding myself about Zope and how Zope and PythonCard might complement each other for just this type of cross-platform (web and desktop) work. ka |