Пример #1
0
        private void MeasureCell(TreePath path, GridViewColumn col)
        {
            int          w, h, x, y, x_offset, y_offset;
            TreeIter     i;
            bool         header   = path.Indices[0] < c_span;
            Rectangle    rect     = new Rectangle();
            CellRenderer renderer = header && col.HeaderRenderer != null ?
                                    col.HeaderRenderer : col.FieldRenderer;

            model.GetIter(out i, path);
            col.CellSetCellData(model, i, header);
            renderer.GetSize(this, ref rect, out x_offset, out y_offset,
                             out w, out h);
            TranslateCoords(path, col, out x, out y);

            widths[x]  = Math.Max((int)widths[x], w + 20);
            heights[y] = Math.Max((int)heights[y], h + 4);
        }