#!/usr/bin/python -w

import gtk
import pango

w = gtk.Window()
t = gtk.Table()
w.add(t)

entries = []

SIZE = 25

for i in xrange(0, SIZE):
    for j in xrange(0, SIZE):
        entry = gtk.Entry()
        entry.modify_font(pango.FontDescription("Sans 5"))
        entry.set_width_chars(5)
        entry.set_text("Foo")
        t.attach(entry, i, i + 1, j, j + 1)
        entries.append(entry)

white = False

def change_colors():
    global white

    if white:
        color = gtk.gdk.Color(65535, 65535, 65535)
    else:
        color = gtk.gdk.Color(50000, 65535, 65535)

    white = not white

    for entry in entries:
        entry.modify_base(gtk.STATE_NORMAL, color)

    return True

gtk.timeout_add(1000, change_colors)

w.show_all()
gtk.main()

