Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #39329
| Date | 2013-02-20 10:34 +0100 |
|---|---|
| From | Roland Koebler <r.koebler@yahoo.de> |
| Subject | Re: Is there a graphical GUI builder? |
| References | <c8492c84-c14f-4c91-aa6a-ed2443fb7987@googlegroups.com> <CAPTjJmrdgcTymCbtJic1S9Dqscdwk0kn2hNqwZv4d9H9PnAVEw@mail.gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.2092.1361352892.2939.python-list@python.org> (permalink) |
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
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Is there a graphical GUI builder? Rex Macey <xer0925@gmail.com> - 2013-02-19 14:19 -0800 Re: Is there a graphical GUI builder? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-02-19 22:30 +0000 Re: Is there a graphical GUI builder? Ian Kelly <ian.g.kelly@gmail.com> - 2013-02-19 15:39 -0700 Re: Is there a graphical GUI builder? Chris Angelico <rosuav@gmail.com> - 2013-02-20 09:43 +1100 Re: Is there a graphical GUI builder? Phil <phil_lor@bigpond.com> - 2013-02-20 08:59 +1000 Re: Is there a graphical GUI builder? Miki Tebeka <miki.tebeka@gmail.com> - 2013-02-19 15:44 -0800 Re: Is there a graphical GUI builder? duncan smith <buzzard@invalid.invalid> - 2013-02-20 02:03 +0000 Re: Is there a graphical GUI builder? Roland Koebler <r.koebler@yahoo.de> - 2013-02-20 03:53 +0100 Re: Is there a graphical GUI builder? Michael Torrie <torriem@gmail.com> - 2013-02-19 20:49 -0700 Re: Is there a graphical GUI builder? Steve Simmons <square.steve@gmail.com> - 2013-02-20 08:44 +0100 Re: Is there a graphical GUI builder? Roland Koebler <r.koebler@yahoo.de> - 2013-02-20 10:34 +0100 Re: Is there a graphical GUI builder? Phil Thompson <phil@riverbankcomputing.com> - 2013-02-20 09:51 +0000 Re: Is there a graphical GUI builder? Chris Angelico <rosuav@gmail.com> - 2013-02-20 20:52 +1100 Re: Is there a graphical GUI builder? Roland Koebler <r.koebler@yahoo.de> - 2013-02-20 11:05 +0100 Re: Is there a graphical GUI builder? Roland Koebler <r.koebler@yahoo.de> - 2013-02-20 11:42 +0100 Re: Is there a graphical GUI builder? Phil Thompson <phil@riverbankcomputing.com> - 2013-02-20 11:19 +0000 Re: Is there a graphical GUI builder? Roland Koebler <r.koebler@yahoo.de> - 2013-02-20 12:52 +0100 Re: Is there a graphical GUI builder? Chris Angelico <rosuav@gmail.com> - 2013-02-20 23:14 +1100 Re: Is there a graphical GUI builder? Laszlo Nagy <gandalf@shopzeus.com> - 2013-02-20 13:09 +0100 Re: Is there a graphical GUI builder? Kevin Walzer <kw@codebykevin.com> - 2013-02-20 08:57 -0500 Re: Is there a graphical GUI builder? Dietmar Schwertberger <maillist@schwertberger.de> - 2013-02-20 21:05 +0100 Re: Is there a graphical GUI builder? Michael Torrie <torriem@gmail.com> - 2013-02-20 20:45 -0700 Re: Is there a graphical GUI builder? PythonAB <python@rgbaz.eu> - 2013-02-21 10:20 +0100 Re: Is there a graphical GUI builder? Chris Angelico <rosuav@gmail.com> - 2013-02-21 21:08 +1100 Re: Is there a graphical GUI builder? Steve Simmons <square.steve@gmail.com> - 2013-02-21 11:18 +0100 Re: Is there a graphical GUI builder? Roland Koebler <r.koebler@yahoo.de> - 2013-02-21 11:37 +0100 Re: Is there a graphical GUI builder? Robert Kern <robert.kern@gmail.com> - 2013-02-21 11:25 +0000 Re: Is there a graphical GUI builder? Roland Koebler <r.koebler@yahoo.de> - 2013-02-21 18:05 +0100 Re: Is there a graphical GUI builder? Robert Kern <robert.kern@gmail.com> - 2013-02-21 21:16 +0000
csiph-web