mono gtk最大化但仍保留顶部空间

mono gtk最大化但仍保留顶部空间,mono,monodevelop,gtk#,maximize-window,Mono,Monodevelop,Gtk#,Maximize Window,何乐而不为 我在玩monodevelop,并使用gtk作为窗口。现在我使用的是Windows7x64 我遇到的问题是,当我最大化窗口时(通过手动或程序,这无关紧要),页面顶部仍然有一些空间。而且它在屏幕底部连接不好。所以看起来整个程序是最大化的,然后降低了几个像素 以下是最大化窗口的屏幕截图: 正如您在第二个打印屏幕中所看到的,可以在顶部获取程序: 所以我的问题很简单。。。我如何才能得到一个良好的方式,这是正常的窗口最大化 编辑 MainWindow.cs(root/gtk gui/Main

何乐而不为

我在玩monodevelop,并使用gtk作为窗口。现在我使用的是Windows7x64

我遇到的问题是,当我最大化窗口时(通过手动或程序,这无关紧要),页面顶部仍然有一些空间。而且它在屏幕底部连接不好。所以看起来整个程序是最大化的,然后降低了几个像素

以下是最大化窗口的屏幕截图:

正如您在第二个打印屏幕中所看到的,可以在顶部获取程序:

所以我的问题很简单。。。我如何才能得到一个良好的方式,这是正常的窗口最大化

编辑 MainWindow.cs(root/gtk gui/MainWindow.cs)中的代码

//此文件由GUI设计器生成。不要修改。
公共部分类主窗口
{
私有全局::Gtk.UIManager UIManager;
私有全局::Gtk.Action文件操作;
私有全局::Gtk.Action停止操作;
全球私有::Gtk.HPaned hpaned1;
私有全局::Gtk.VBox vbox1;
私有全局::Gtk.MenuBar menubar2;
全球私有::Gtk.HBox hbox1;
私有全局::Gtk.Button按钮1;
全球私有::Gtk.HPaned hpaned3;
私有全局::Gtk.scrolled窗口gtkscrolledwindowo;
私有全局::Gtk.TreeView treeview1;
私有全局::Gtk.ProgressBar progressbar1;
受保护的虚拟void生成()
{
全局::Stetic.Gui.Initialize(this);
//窗口小部件主窗口
this.UIManager=new global::Gtk.UIManager();
全局::Gtk.ActionGroup w1=新的全局::Gtk.ActionGroup(“默认”);
this.FileAction=new global::Gtk.Action(“FileAction”,global::Mono.Unix.Catalog.GetString(“文件”),null,null);
this.FileAction.ShortLabel=global::Mono.Unix.Catalog.GetString(“文件”);
w1.Add(this.FileAction,null);
this.stopAction=new global::Gtk.Action(“stopAction”,global::Mono.Unix.Catalog.GetString(“Exit”),null,“Gtk stop”);
this.stopAction.ShortLabel=global::Mono.Unix.Catalog.GetString(“退出”);
w1.添加(this.stopAction,null);
this.UIManager.InsertActionGroup(w1,0);
this.AddAccelGroup(this.UIManager.AccelGroup);
this.Name=“MainWindow”;
this.Title=global::Mono.Unix.Catalog.GetString(“最大化窗口”);
this.WindowPosition=((全局::Gtk.WindowPosition)(3));
this.AllowShrink=true;
这个.DefaultWidth=1024;
此.DefaultHeight=768;
//容器子主窗口.Gtk.Container+ContainerChild
this.hpaned1=新的全局::Gtk.HPaned();
this.hpaned1.CanFocus=true;
this.hpaned1.Name=“hpaned1”;
this.hpaned1.Position=1;
//容器子项hpaned1.Gtk.Paned+PanedChild
this.vbox1=新的全局::Gtk.VBox();
this.vbox1.Name=“vbox1”;
this.vbox1.spating=6;
//容器子项vbox1.Gtk.Box+BoxChild
this.UIManager.AddUiFromString(“”);
this.menubar2=((全局::Gtk.MenuBar)(this.UIManager.GetWidget(“/menubar2”));
this.menubar2.Name=“menubar2”;
this.vbox1.Add(this.menubar2);
global::Gtk.Box.BoxChild w2=((global::Gtk.Box.BoxChild)(this.vbox1[this.menubar2]);
w2.位置=0;
w2.Expand=false;
w2.填充=假;
//容器子项vbox1.Gtk.Box+BoxChild
this.hbox1=新的全局::Gtk.HBox();
this.hbox1.Name=“hbox1”;
this.hbox1.spating=6;
//容器子项hbox1.Gtk.Box+BoxChild
this.button1=新的全局::Gtk.Button();
this.button1.CanFocus=true;
this.button1.Name=“button1”;
this.button1.UseUnderline=true;
this.button1.Label=global::Mono.Unix.Catalog.GetString(“GtkButton”);
this.hbox1.Add(this.button1);
global::Gtk.Box.BoxChild w3=((global::Gtk.Box.BoxChild)(this.hbox1[this.button1]);
w3.位置=1;
w3.Expand=false;
w3.Fill=false;
this.vbox1.Add(this.hbox1);
global::Gtk.Box.BoxChild w4=((global::Gtk.Box.BoxChild)(this.vbox1[this.hbox1]);
w4.位置=1;
w4.Expand=false;
w4.填充=假;
//容器子项vbox1.Gtk.Box+BoxChild
this.hpaned3=新的全局::Gtk.HPaned();
this.hpaned3.CanFocus=true;
this.hpaned3.Name=“hpaned3”;
this.hpaned3.Position=91;
this.hpaned3.BorderWidth=((uint)(2));
//容器子项hpaned3.Gtk.Paned+PanedChild
this.GtkScrolledWindow=新的全局::Gtk.scrolled窗口();
this.GtkScrolledWindow.Name=“GtkScrolledWindow”;
this.GtkScrolledWindow.ShadowType=((全局::Gtk.ShadowType)(1));
//容器子级GtkScrolledWindow.Gtk.Container+ContainerChild
this.treeview1=新的全局::Gtk.TreeView();
this.treeview1.CanFocus=true;
this.treeview1.Name=“treeview1”;
this.GtkScrolledWindow.Add(this.treeview1);
this.hpaned3.Add(this.GtkScrolledWindow);
global::Gtk.Paned.PanedChild w6=((global::Gtk.Paned.PanedChild)(this.hpaned3[this.GtkScrolledWindow]);
w6.Resize=false;
this.vbox1.Add(this.hpaned3);
global::Gtk.Box.BoxChild w7=((global::Gtk.Box.BoxChild)(this.vbox1[this.hpaned3]);
w7.位置=2;
//容器子项vbox1.Gtk.Box+BoxChild
this.progressbar1=新的全局::Gtk.ProgressBar();
this.progressbar1.Name=“progressbar1”;
this.vbox1.Add(this.progressbar1);
global::Gtk.Box.BoxChild w8=((global::Gtk.Box.BoxChild)(this.vbox1[this.progressbar1]);
w8.位置=3;
w8.Expand=false;
w8.填充=假;
this.hpaned1.Add(this.vbox1);
this.Add(this.hpaned1);
如果((this.Child!=null)){
this.Child.ShowAll();
}
this.Show();
// This file has been generated by the GUI designer. Do not modify.
public partial class MainWindow
{
    private global::Gtk.UIManager UIManager;
    private global::Gtk.Action FileAction;
    private global::Gtk.Action stopAction;
    private global::Gtk.HPaned hpaned1;
    private global::Gtk.VBox vbox1;
    private global::Gtk.MenuBar menubar2;
    private global::Gtk.HBox hbox1;
    private global::Gtk.Button button1;
    private global::Gtk.HPaned hpaned3;
    private global::Gtk.ScrolledWindow GtkScrolledWindow;
    private global::Gtk.TreeView treeview1;
    private global::Gtk.ProgressBar progressbar1;

    protected virtual void Build ()
    {
        global::Stetic.Gui.Initialize (this);
        // Widget MainWindow
        this.UIManager = new global::Gtk.UIManager ();
        global::Gtk.ActionGroup w1 = new global::Gtk.ActionGroup ("Default");
        this.FileAction = new global::Gtk.Action ("FileAction", global::Mono.Unix.Catalog.GetString ("File"), null, null);
        this.FileAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("File");
        w1.Add (this.FileAction, null);
        this.stopAction = new global::Gtk.Action ("stopAction", global::Mono.Unix.Catalog.GetString ("Exit"), null, "gtk-stop");
        this.stopAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Exit");
        w1.Add (this.stopAction, null);
        this.UIManager.InsertActionGroup (w1, 0);
        this.AddAccelGroup (this.UIManager.AccelGroup);
        this.Name = "MainWindow";
        this.Title = global::Mono.Unix.Catalog.GetString ("Maximized Window");
        this.WindowPosition = ((global::Gtk.WindowPosition)(3));
        this.AllowShrink = true;
        this.DefaultWidth = 1024;
        this.DefaultHeight = 768;
        // Container child MainWindow.Gtk.Container+ContainerChild
        this.hpaned1 = new global::Gtk.HPaned ();
        this.hpaned1.CanFocus = true;
        this.hpaned1.Name = "hpaned1";
        this.hpaned1.Position = 1;
        // Container child hpaned1.Gtk.Paned+PanedChild
        this.vbox1 = new global::Gtk.VBox ();
        this.vbox1.Name = "vbox1";
        this.vbox1.Spacing = 6;
        // Container child vbox1.Gtk.Box+BoxChild
        this.UIManager.AddUiFromString ("<ui><menubar name=\'menubar2\'><menu name=\'FileAction\' action=\'FileAction\'><menuite" +
                "m name=\'stopAction\' action=\'stopAction\'/></menu></menubar></ui>");
        this.menubar2 = ((global::Gtk.MenuBar)(this.UIManager.GetWidget ("/menubar2")));
        this.menubar2.Name = "menubar2";
        this.vbox1.Add (this.menubar2);
        global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.menubar2]));
        w2.Position = 0;
        w2.Expand = false;
        w2.Fill = false;
        // Container child vbox1.Gtk.Box+BoxChild
        this.hbox1 = new global::Gtk.HBox ();
        this.hbox1.Name = "hbox1";
        this.hbox1.Spacing = 6;
        // Container child hbox1.Gtk.Box+BoxChild
        this.button1 = new global::Gtk.Button ();
        this.button1.CanFocus = true;
        this.button1.Name = "button1";
        this.button1.UseUnderline = true;
        this.button1.Label = global::Mono.Unix.Catalog.GetString ("GtkButton");
        this.hbox1.Add (this.button1);
        global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.button1]));
        w3.Position = 1;
        w3.Expand = false;
        w3.Fill = false;
        this.vbox1.Add (this.hbox1);
        global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.hbox1]));
        w4.Position = 1;
        w4.Expand = false;
        w4.Fill = false;
        // Container child vbox1.Gtk.Box+BoxChild
        this.hpaned3 = new global::Gtk.HPaned ();
        this.hpaned3.CanFocus = true;
        this.hpaned3.Name = "hpaned3";
        this.hpaned3.Position = 91;
        this.hpaned3.BorderWidth = ((uint)(2));
        // Container child hpaned3.Gtk.Paned+PanedChild
        this.GtkScrolledWindow = new global::Gtk.ScrolledWindow ();
        this.GtkScrolledWindow.Name = "GtkScrolledWindow";
        this.GtkScrolledWindow.ShadowType = ((global::Gtk.ShadowType)(1));
        // Container child GtkScrolledWindow.Gtk.Container+ContainerChild
        this.treeview1 = new global::Gtk.TreeView ();
        this.treeview1.CanFocus = true;
        this.treeview1.Name = "treeview1";
        this.GtkScrolledWindow.Add (this.treeview1);
        this.hpaned3.Add (this.GtkScrolledWindow);
        global::Gtk.Paned.PanedChild w6 = ((global::Gtk.Paned.PanedChild)(this.hpaned3 [this.GtkScrolledWindow]));
        w6.Resize = false;
        this.vbox1.Add (this.hpaned3);
        global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.hpaned3]));
        w7.Position = 2;
        // Container child vbox1.Gtk.Box+BoxChild
        this.progressbar1 = new global::Gtk.ProgressBar ();
        this.progressbar1.Name = "progressbar1";
        this.vbox1.Add (this.progressbar1);
        global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.progressbar1]));
        w8.Position = 3;
        w8.Expand = false;
        w8.Fill = false;
        this.hpaned1.Add (this.vbox1);
        this.Add (this.hpaned1);
        if ((this.Child != null)) {
            this.Child.ShowAll ();
        }
        this.Show ();
        this.DeleteEvent += new global::Gtk.DeleteEventHandler (this.OnDeleteEvent);
        this.stopAction.Activated += new global::System.EventHandler (this.stopProgram);
    }
}