.Net Like Gui Builder for Python?

TP wingusr at gmail.com
Sat Jul 26 06:13:41 CEST 2014

On Fri, Jul 25, 2014 at 7:40 PM, Chris Angelico <rosuav at gmail.com> wrote:

> The OP asked for two things, which I'll separate because they're
> actually quite different.
> 1) Drag and drop widgets to create a window
> 2) Double-click a widget to edit its code (presumably event handler)
> I have used a number of GUI toolkits that did provide the first one,
> but the second is a lot more restrictive than you might think

Not that I disagree with the overall point of just using a text editor
(especially for Python GUIs) but apparently you've never created a C# WPF
app using Visual Studio? WPF fully supports layout controls, is *not*
generally pixel based it's more similar to HTML + CSS (although you do
pixel perfect layout if you try), and still easily does (2). And while I
almost exclusively use the Visual Studio XAML tab view rather than
bothering with the Designer view you can drag & drop if you really want to.
And Microsoft's Expression Blend takes that to a whole 'nother level
supposedly making it easy for "even" graphic designers to create GUIs
without delving too much into raw code wrangling.

One of the nice things about VIsual Studio and WPF (even in the XAML view)
is its Properties window. This lets you select a control and see all the
applicable possible properties and what legal choices you have for setting
them. This is an incredible aid to discovering how to use said controls.

And as far as any limitations of (2) goes, I still like using the Events
view of the Properties window to initially hook up an event handler. This
automatically creates a  "correctly" (or at least consistently) named and
argumented event handler and adds the proper attribute to the XAML. It is
easy enough to then mess around with the generated code if that doesn't
quite suit your needs. Having the list of possible event handlers all in
one place instead of having to look up the doc is invaluable. And being
able to press F1 just about anywhere and have the relevant document open up
is even more so.

As far as I've seen Visual Studio + WPF really is state of the art for GUI
building. I wish more developers were familiar with all its capabilities so
they could know what to whine for in their own programming environment :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20140725/e01ad3e1/attachment.html>

More information about the Python-list mailing list