Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!newsfeed.eweka.nl!eweka.nl!feeder3.eweka.nl!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'essentially': 0.04; 'badly': 0.07; 'differently': 0.07; 'dynamically': 0.07; 'python': 0.09; 'grid': 0.09; 'novel': 0.09; 'other,': 0.09; 'pixels': 0.09; 'tab': 0.09; 'tends': 0.09; 'gui': 0.11; 'size,': 0.13; '(the': 0.15; '[*]': 0.16; 'anymore': 0.16; 'applets': 0.16; 'both.': 0.16; 'buttons,': 0.16; 'from:addr:r.koebler': 0.16; 'from:name:roland koebler': 0.16; 'layout,': 0.16; 'qt,': 0.16; 'received:78.47': 0.16; 'sizes,': 0.16; 'subject:GUI': 0.16; 'textually': 0.16; 'widgets.': 0.16; 'widget': 0.17; 'systems.': 0.18; '(or': 0.18; 'windows': 0.19; 'define': 0.20; 'putting': 0.20; 'java': 0.21; 'visible': 0.22; 'tables': 0.23; "i've": 0.23; 'idea': 0.24; 'so.': 0.24; 'linux': 0.24; 'allows': 0.25; 'header :In-Reply-To:1': 0.25; 'looks': 0.26; 'skip:" 20': 0.26; '(e.g.': 0.27; 'rules': 0.27; 'designer': 0.27; 'mix': 0.27; 'fixed': 0.28; 'run': 0.28; 'app.': 0.29; 'horizontal': 0.29; 'reward': 0.29; 'vertical': 0.29; 'e.g.': 0.30; 'normally': 0.30; 'window': 0.30; 'button': 0.30; 'etc.)': 0.32; 'running': 0.32; 'instead,': 0.33; 'problem': 0.33; 'to:addr:python-list': 0.33; 'hi,': 0.33; 'text': 0.34; 'subject:?': 0.35; 'add': 0.36; 'but': 0.36; 'anything': 0.36; 'should': 0.36; 'charset:us-ascii': 0.36; 'problems': 0.36; 'possible': 0.37; 'editor': 0.37; 'does': 0.37; 'being': 0.37; 'rather': 0.37; 'subject:: ': 0.38; 'supports': 0.38; 'some': 0.38; 'things': 0.38; 'several': 0.39; 'to:addr:python.org': 0.39; 'easily': 0.39; 'build': 0.39; 'where': 0.40; 'think': 0.40; 'your': 0.60; 'content-disposition:inline': 0.60; 'skip:u 10': 0.60; 'matter': 0.61; 'real': 0.61; 'side': 0.61; 'strange': 0.62; 'different': 0.63; 'more': 0.63; 'border': 0.65; 'subject:there': 0.65; 'positions': 0.68; 'cut': 0.71; 'obvious': 0.71; 'etc,': 0.84; 'visually': 0.84; 'window,': 0.84; 'besides,': 0.93; 'notebook': 0.96 Date: Wed, 20 Feb 2013 10:34:50 +0100 From: Roland Koebler To: python-list@python.org Subject: Re: Is there a graphical GUI builder? References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 53 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1361352892 news.xs4all.nl 6895 [2001:888:2000:d::a6]:46351 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:39329 Hi, > That way of building a window tends to produce programs that port > badly to other systems. hmm, I don't think so. I've build several applications in C + GTK/Glade and Python + GTK/Glade, which easily run on Linux and Windows without any GUI changes. > playing with Java applets introduced > the novel and somewhat strange idea that your window should be built > using rules and layouts, to avoid problems with button sizes, fonts, > etc, etc. Do you know the container-concept of GTK+ and Glade? In many GUI-builders, you set your widgets to fixed positions (e.g. a text field at x16/y16 with 100*30 pixels, a button at x16/y50 with 100*50 pixels etc.). This is *bad*, and causes all kinds of problems with e.g. different window- or font-sizes, like widgets outside of the visible window, text running over the border of a widget or being cut at the edge of the widget etc. But: GTK+ has a wonderful concept of "containers" [*]. You normally don't set widgets to fixed positions -- instead, you add layout tables (or vertical boxes or horizontal boxes or ...), and essentially define that some widgets should be above each other, side by side or in a grid layout, so you more or less define the layout logically. The real size and position of the widgets is dynamically calculated by GTK+, so they always have the right size, and different font sizes, different window sizes, etc. are not a problem anymore [q]. And Glade (the GTK+ GUI builder) works exactly that way. [*] Besides, the container-concept also allows such nice things like putting anything inside a button (e.g. 2 images and a label), or inside a notebook tab etc. pp. [q] In Qt, it's also possible to generate such flexible layouts. But it's unfortunately not the default way in Qt, and the Qt designer only supports it rudimentarily, and in a much less obvious way. And Qt does not have such a "container"-concept, where many widgets (e.g. buttons, notebook registers etc.) contain other widgets. > You have to think about your window differently - think about what > you're putting where, rather than going visually "that looks about > right" - but the reward is that it'll look right no matter where you > run your app. Yes, that's also true for GTK+/Glade. But you have the choice to either build you GUI graphically with your mouse, or textually in your editor -- or mix both. regards Roland