Hi there,
I was trying to put a fixed width on some of my CellRendererText when I
got a strange warning sayng that my width (200) was invalid or out or
range, and the width isn't set to that value.
GLib-GObject-WARNING **: value "200" of type `gint' is
invalid or out of range for property `width' of type `gint'
After some tests i found out that this happens only if i try to set a
width higher than 100 using cell.set_property('width', width). But, if I
use cell.set_fixed_size(width, height), doesn't matter if width is
higher than 100, it works.
I wonder why this happens, cause at least for me the width attribute set
by set_fixed_size() and set_property('width') should be the same. Is
this a bug? Should I file a bug report?
Or I misunderstud something?
I'm attaching the code i wrote to test this.
Using gtk+-2.2.4 and pygtk-2.0.0.
Guilherme Salgado
--
This email has been inspected by Hans Blix, who has reported that no
weapons of mass destruction were used in its construction.
Read his report here:
<http://www.un.org/apps/news/infocusnewsiraq.asp?NewsID=414&sID=6>
import pygtk;pygtk.require('2.0')
import gtk
w =gtk.Window()
model = gtk.ListStore(str, str, str)
l = gtk.TreeView(model)
r = gtk.CellRendererText()
r2 = gtk.CellRendererText()
r.set_property('width', 200)
col = gtk.TreeViewColumn('foo', r, text=0)
r2.set_property('width', 100)
col2 = gtk.TreeViewColumn('foo2', r2, text=1)
r3 = gtk.CellRendererText()
r3.set_fixed_size(200, 20)
col3 = gtk.TreeViewColumn('foo3', r3, text=2)
l.append_column(col)
l.append_column(col2)
l.append_column(col3)
model.append(('zzz', 'zzzzzzzzzzzzzzzzzz', 'ssssssssddddddddddd'))
model.append(('vvv', 'xxxxxxxxxxxxxxxxxx', 'sssssssssssssssssss'))
w.add(l)
w.show_all()
gtk.main()
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/