El jue, 11-09-2003 a las 07:42, Abel Daniel escribi�:
> Lorenzo Gil Sanchez writes:
> > I think you should check if cell_area is None in your on_get_size()
> > method because IIRC only the first time that is called it is None. I
> > don't know why btw.
> The problem is that it isn't called again, no matter what I do with the
> window (iconize, resize, etc.).
> 
> Does this mean that it is impossible to create a CellRenderer that adjustes
> it's height according to it's width?
> 
> > http://www.daa.com.au/pipermail/pygtk/2003-January/004239.html
> that was where I started from when creating mine.

I think I know where is your problem. I just compared your code with
Johan code and look what he does in his on_render method:

def on_render(...):
    x_offset, y_offset, width, height = self.on_get_size(widget,
cell_area)

So that's why the method on_get_size is called the second time with a
valid value for cell_area.

Hope it helps

Lorenzo


_______________________________________________
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