[pygtk] Reset form

Danny Milosavljevic danny.milo at gmx.net
Wed Oct 6 21:33:00 WST 2004


hi,

Am Mittwoch, den 06.10.2004, 15:26 +0200 schrieb Marcus Habermehl:
> Am Mittwoch, den 06.10.2004, 15:13 +0159 schrieb Matthias Teege:
> > Moin,
> > 
> > I have a form with a lot of entry widgets. To clear the form I call
> > set_text('') for every entry. Is there a better/faster/better looking
> > way to reset a form? I ask because 'set_text('')' is not correct in
> > sense of the underlying database where an empty value is NULL not ''. 
> > It would be also cool if the entry widget can handle None. At the
> > moment I've get a "TypeError: GtkEntry.set_text() argument 1 must be
> > string, not None" if I try to set_text(None).
> 
> I don't have tested this. But the help of gtk.Entry gives this:
> [...]
>   Signals from GtkEditable:
>     insert-text (gchararray, gint, gpointer)
>     delete-text (gint, gint)
> [...]

That is for the clipboard afaik. 
'changed' signal is more interesting usually.

cheers,
   Danny

-- 
www.keyserver.net key id A334AEA6

-------------- nächster Teil --------------
Ein Dateianhang mit Binärdaten wurde abgetrennt...
Dateiname   : nicht verfügbar
Dateityp    : application/pgp-signature
Dateigröße  : 189 bytes
Beschreibung: Dies ist ein digital signierter Nachrichtenteil
URL         : http://www.daa.com.au/pipermail/pygtk/attachments/20041006/c9322474/attachment.bin


More information about the pygtk mailing list