Christian Robottom Reis wrote:

On Wed, Feb 11, 2004 at 01:05:09PM +0300, trash1 wrote:


In wxPython I can use wxPanel for changing background color in some square area. And I can place some widgets inside or over it.

Whitch widget I must use in pyGTK2?



Any widget which has an X window (see FAQ 3.5) can have its background color changed. See FAQ 4.6.

http://www.async.com.br/faq/pygtk/index.py?req=show&file=faq04.006.htp

Note that this is unrelated to PyGTK vs. PyGTK-2 -- you were using
wxPython, which wraps GTK+ and therefore will behave differently in
[many?] situations.



I'm try to migrate from wxPython to PyGTK.
---
tested and not working this:
=====
back = glade.get_widget("hbox4")
back.modify_bg(gtk.STATE_INSENSITIVE, gtk.gdk.Color(red=127, green=127, blue=127))
=====


and this (similar to FAQ 4.6):
======
back = glade.get_widget("hbox4")
map=back.get_colormap()
colour = map.alloc_color("#7f7f7f")
style = back.get_style().copy()
style.bg[gtk.STATE_INSENSITIVE] = colour
back.set_style(style)
======

Aleksey



_______________________________________________
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