diff options
author | Philip Van Hoof <pvanhoof@mono-cvs.ximian.com> | 2003-07-02 01:49:21 +0400 |
---|---|---|
committer | Philip Van Hoof <pvanhoof@mono-cvs.ximian.com> | 2003-07-02 01:49:21 +0400 |
commit | 8a1df3bec7fb278020aa53673f116c388d388f2a (patch) | |
tree | b0c48a46474246285bcc2020a6003cd5ec5117e3 /mcs/class/System.Windows.Forms/Gtk/Form.cs | |
parent | bffeec2aec84307f3aa97298e29eaf34ad227f55 (diff) |
Added statusbar support and fixed the vbox used for packing the menu and other special Controls
svn path=/trunk/mcs/; revision=15828
Diffstat (limited to 'mcs/class/System.Windows.Forms/Gtk/Form.cs')
-rw-r--r-- | mcs/class/System.Windows.Forms/Gtk/Form.cs | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/mcs/class/System.Windows.Forms/Gtk/Form.cs b/mcs/class/System.Windows.Forms/Gtk/Form.cs index 5f80ed1b03f..f6ac5e28733 100644 --- a/mcs/class/System.Windows.Forms/Gtk/Form.cs +++ b/mcs/class/System.Windows.Forms/Gtk/Form.cs @@ -22,7 +22,6 @@ namespace System.Windows.Forms { // if the application has a menu and/or a statusbar // then this menu should be added to the vbox before // the layout and the statusbar after the layout - Gtk.VBox vbox = null; Control menu = null; public Form () : base () @@ -31,6 +30,7 @@ namespace System.Windows.Forms { static Form () { + // this happens to late (added this to Control's static constructor) Gtk.Application.Init (); } @@ -53,7 +53,7 @@ namespace System.Windows.Forms { win.Title = Text; vbox = new Gtk.VBox(false, 0); win.Add (vbox); - vbox.Show (); + vbox.ShowAll (); vbox.PackStart(contents, true, true, 0); return (Widget) win; } @@ -268,12 +268,7 @@ namespace System.Windows.Forms { } set { this.menu = value; - MainMenu m = (MainMenu)value; - this.vbox.PackStart(m.mb, false, false, 0); - - m.mb.Show(); - this.vbox.ReorderChild (m.mb, 0); - Control.Controls.Add(this.menu, false); + Control.Controls.Add(this.menu); } } // [MonoTODO] @@ -469,13 +464,16 @@ namespace System.Windows.Forms { // [MonoTODO] public void SuspendLayout() { - throw new NotImplementedException (); } // [MonoTODO] public void ResumeLayout() { - throw new NotImplementedException (); } + + public void ResumeLayout (bool performLayout) + { + } + // [MonoTODO] // public void Scale(float f) // { |