Hi all, I have a nice TreeView with two columns, the first being a filename and the second being a version number. Now I'd like to be the version number of a fixed width and the filename take up the rest of the available space. Sounds easy? Not for me! From experience and the docs it seems that with TreeViews, it's always the last column that receives any left over space. So I've tried a rather awkward workaround: connect to the "size-allocate" signal of the container, and reset the widths like that:
: def resize(self, widget, umpf): : if self.resizing: : self.resizing = False : return : total = self.versCol.get_width() + self.imageCol.get_width() : img = max(total - self.versWidth, self.imageWidth) : self.resizing = True : self.imageCol.set_fixed_width(img) : self.versCol.set_fixed_width(self.versWidth) ... which works mostly. Alas, when I actually resize my window, the columns are not redrawn unless I force them to by, e.g. moving over them with the pointer. All in all, the whole thing looks terribly hackish and wrong to me. Does anyone have a better idea how to accomplish it? Thanks in advance, Hans-Joachim _________________________________________________________________________ Mit der Gruppen-SMS von WEB.DE FreeMail können Sie eine SMS an alle Freunde gleichzeitig schicken: http://freemail.web.de/features/?mc=021179 _______________________________________________ pygtk mailing list [email protected] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
