Hi!

It's my first encounter with pygtk. And I must say that setting
the colors is much more complicated here than in Qt.

After 3 hours of reading of archives of this list neither method
proposed worked for me.

Could someone, please, help me?

Below you find my simple GNOME applet which is supposed 
to show the ACPI battery status on systems with no ACPI in the kernel:

How can I make the label background dark blue and the label letters green?

Would it be much harder to be able to switch letters to red when
necessary ?

Please, help me. I tried tens of ways and neither really worked.

BR,

Jacek

#!/usr/bin/env python

import gnome.applet
import gtk
import time

def update_label():
        str = "applet"
        label.set_text(str)
        return gtk.TRUE

app = gnome.applet.AppletWidget("python-battery")

frame = gtk.GtkFrame()
label = gtk.GtkLabel()
label.set_padding(1,1)
update_label()

frame.add(label)
label.show()

frame.show()
app.add(frame)
app.set_tooltip("Python battery")

app.show()

gtk.timeout_add(2000, update_label)

gtk.mainloop()


_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to