我试图通过调用使窗口不可调整大小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 ();
}
}