[pygtk] Verifying Entry inputs

Christian Reis kiko at async.com.br
Sat Feb 26 19:43:29 WST 2005


On Fri, Feb 25, 2005 at 11:08:00AM +0000, Gustavo J. A. M. Carneiro wrote:
>   My solution, although also not perfect, was to place a small
> gtk.STOCK_DIALOG_WARNING icon inside the entry, and toggle between
> making it insensitive (=value OK) or sensitive (=bad value).

Interesting! Can we see some screenshots of this? I had never thought of
this approach and it sounds way cool (though it _does_ take up some of
the entry's real estate). Dream scenario might be a window which
overlays the screen when a validation error occurs.

One of the issues with validation is a performance issue -- some stuff
takes a while to validate (checking database contents, etc). Another is
the fact that certain patterns are only really validatable when
completely entered (i.e. 123. is invalid but 123.2 is not, though I'm
thinking of more complex situations than this -- involving database
contents as well).

This is one of the two major unsolved issues for me in UI work using
GTK+. The other issue is selecting an item from a large (potentially
database-driven) collection -- autocompletion combos are close, but
still not what we really need.

Take care,
--
Christian Robottom Reis | http://async.com.br/~kiko/ | [+55 16] 3361 2331


More information about the pygtk mailing list