protected override void Render(Drawable window, Widget widget, Rectangle background_area, Rectangle cell_area, Rectangle expose_area, CellRendererState flags) { if (instance == null || !visible) { return; } int width = 0, height = 0; int iwidth = cell_area.Width - (int)this.Xpad * 2; if (editorCell != null) { editorCell.GetSize((int)(cell_area.Width - this.Xpad * 2), out width, out height); } Rectangle bounds = new Rectangle(); bounds.Width = width > iwidth ? iwidth : width; bounds.Height = height; bounds.X = (int)(cell_area.X + this.Xpad); bounds.Y = cell_area.Y + (cell_area.Height - height) / 2; StateType state = GetState(flags); if (editorCell != null) { editorCell.Render(window, bounds, state); } }