Ejemplo n.º 1
0
        protected override void OnSizeAllocated(Gdk.Rectangle allocation)
        {
            base.OnSizeAllocated(allocation);

            Gtk.Requisition table_req = table.ChildRequisition;
            allocation.X      = Math.Max((allocation.Width - table_req.Width) / 2, 0);
            allocation.Y      = Math.Max((allocation.Height - table_req.Height) / 2, 0);
            allocation.Width  = table_req.Width;
            allocation.Height = table_req.Height;

            table.SizeAllocate(allocation);
        }