|
Re: Verifying Entry inputs: msg#00141gnome.gtk+.python
Gustavo J. A. M. Carneiro wrote: On Fri, 2005-02-25 at 10:57 +0000, John Gill wrote:I also had that problem with a "Table for dummies" widget and took the following solution: Requesting the gtk.Style object and use one of the colors of a state other than normal, depending on what you are doing. In my case this was the base color in a cell. For the entry validation case, it could be even better to animate the effect, perhaps by rotating through a pair of these colors... but I haven't implemented this:). This is what I did for a treeview... def get_color_string(color): assert isinstance(color, gtk.gdk.Color) return "#%04X%04X%04X" % (color.red, color.green, color.blue) temp_tv = gtk.TreeView() normal_color = get_color_string(temp_tv.get_style().base[gtk.STATE_NORMAL]) strong_color = get_color_string(temp_tv.get_style().base[gtk.STATE_SELECTED]) del temp_tv Fernando Sanmartín Woerner also wrote some sort of a validating gtk.Entry IIRC for its use in pygestor called PixEntryCompletion. Your can get the code for pygestor here: http://www.galilea.cl/gestor/descargas.html and see PixEntryCompletion in action (swf screen capture) here: http://www.galilea.cl/~snmartin/swf/pec/pec.html It would be great having a "repository" for this pygtk friendly widgets if they are general enough... Pachi _______________________________________________ pygtk mailing list pygtk@xxxxxxxxxx http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/ |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Verifying Entry inputs: 00141, Gustavo J. A. M. Carneiro |
|---|---|
| Next by Date: | Re: Verifying Entry inputs: 00141, Gustavo J. A. M. Carneiro |
| Previous by Thread: | Re: Verifying Entry inputsi: 00141, Gustavo J. A. M. Carneiro |
| Next by Thread: | Re: Verifying Entry inputs: 00141, Gustavo J. A. M. Carneiro |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |