[Python-3000] GUI widgets

Antoine Pitrou solipsis at pitrou.net
Tue May 9 19:01:35 CEST 2006


Hi

Le mardi 09 mai 2006 à 09:30 -0700, Bill Janssen a écrit :
> I have to confess I don't see the point of some of them: Listview and
> Gridview are trivial if there's a reasonable layout system,

Listviews (and likewise Gridviews) have more functionality than a simple
layout. An average listview provides column headers, resizeable columns,
scrolling management if the list becomes too long. A good listview would
be able to automatically sort itself it the user clicks on a column
header, it would provide an easy insertion/update/deletion API (wx is
awful in that regard because you have to use autoincremented integer
indices into the list... a Pythonic API would allow any hashable object
to reference an item).

Having them integrated into the toolkit means:
- much less work for the GUI developer
- better and more consistent user experience on the desktop

It is a similar argument to saying "we already offer scrollbar widgets,
we don't need to provide scrollable views because the developer can
build them himself".

I'd say Listviews are fundamental. Gridviews seem much less often used.

> Statusbar
> and Toolbar are likewise just arrays of other widgets.

It depends what functionality there is in the toolbar. If the toolbar is
designed to integrate into the dekstop, then the appearance of icons can
be dictated by global settings (picture / text / text below picture /
text on right of the picture). Some toolkits may offer detachable
toolbars (again, depending on global settings from the user). Not to
mention that toolbars can be themed a bit differently than the rest of
the window. Usually toolbar icons do not look like other buttons (e.g.
they are flat instead of bevelled, and their borders only appear when
they are hovered with the mouse).


> I also don't really see the point of the "standard
> application dialogs", as they are so easy to build yourself.

The point is really that they are standard ;-), so they look like other
standard dialogs.
For example all error or warning dialogs will look the same, with the
same icons, the same button order and labeling, etc.

> "Color chooser" and "Font chooser" seem to fall into the category of
> "widgets that aren't used by UIs, but are very hard to build yourself,
> so the toolkit should do it", which is a reasonable contention
> (though, I think, not overwhelming).

Agreed.

> Styled text is another question mark.  Though I've used static styled
> text, and found it handy, I'm not sure I'd miss it that much.  Ditto
> for editable styled text (I'm not sure I've ever used it).

I think styled text display is important. Editable styled text much
less.
An example use case for styled text display: a chat window with chat
messages scrolling along, where you want the name of the participant to
be displayed in bold at the beginning of his/her messages.

Regards

Antoine.




More information about the Python-3000 mailing list