1

我试图通过调用使窗口不可调整大小myWindow.Resizable = false;,但是当我这样做时,窗口的右边缘和底部会捕捉到按钮,而不是保持我指定的默认大小。是什么赋予了?

using System;
using Gtk;

class WindowTester
{
    static void Main ()
    {

        Application.Init ();
        Window myWindow = new Window ("This is a window");
        myWindow.DeleteEvent += OnDelete;
        myWindow.Resizable = false;    
        myWindow.SetDefaultSize(600, 400);

        //Put a button in the Window
        Button button = new Button ("Click");
        button.SetSizeRequest(75,30);
        Fixed container = new Fixed();
        container.Put(button, 500, 350);

        myWindow.Add (container);
        myWindow.ShowAll ();
        Application.Run ();
    }

    static void OnDelete (object o, DeleteEventArgs e)
    {
        Application.Quit ();
    }   
}
4

1 回答 1

0

解决方法是在窗口的右下角添加一个空标签。他们应该真的解决这个问题。

于 2012-07-19T14:54:14.577 回答