diff options
author | Joel Basson <joel@mono-cvs.ximian.com> | 2004-01-15 20:19:30 +0300 |
---|---|---|
committer | Joel Basson <joel@mono-cvs.ximian.com> | 2004-01-15 20:19:30 +0300 |
commit | 802417f47904efb5fca5e50fd45e95ee04441abf (patch) | |
tree | e3c381fb87f15e3da6ce1bf7564d3f7eb84ca959 /mcs/class/System.Windows.Forms/Gtk/Form.cs | |
parent | 3ed04254b321118dd67b39d0ca6a76fc58ae12e4 (diff) |
Thu Jan 16 19:20:00 GMT+2 2003 Joel Basson <jstrike@mweb.co.za>
* Applied patch from Alberto Fernandez with the following changes...
Finished ProgressBar (Events?)
Finished HScrollBar VScrollBar and ScrollBar
Finished FolderBrowserDialog
Base ComboBox
Added DrawMode.cs
Added ComboBoxStyle.cs
Added Appearance.cs
Added CheckState.cs
Added TabAlignment
Added TabAppearance.cs
Added TabDrawMode.cs
Added TabSizeMode.cs
Added Panel.cs
Added TabPage.cs
Added TabControl.cs
Added Cursors.cs
Added MessageBoxDefaultButton.cs
Added MessageBoxIcon.cs
Added MessageBoxOptions.cs
Changes in MessageBoxButtons.cs (Added values)
Changes in MessageBox (Completed all functions, added return values).
"Finished" CheckBox.cs
"Finished" ComboBox.cs
"Finished" RadioButton
"Finished" GroupBox
"Finished" Panel
Changes in Form to work with new RadioButton.
Fix double Click reported on MenuItems.
"Finished" Application
svn path=/trunk/mcs/; revision=22123
Diffstat (limited to 'mcs/class/System.Windows.Forms/Gtk/Form.cs')
-rw-r--r-- | mcs/class/System.Windows.Forms/Gtk/Form.cs | 47 |
1 files changed, 22 insertions, 25 deletions
diff --git a/mcs/class/System.Windows.Forms/Gtk/Form.cs b/mcs/class/System.Windows.Forms/Gtk/Form.cs index e81bb3f03ab..ea8410baa0c 100644 --- a/mcs/class/System.Windows.Forms/Gtk/Form.cs +++ b/mcs/class/System.Windows.Forms/Gtk/Form.cs @@ -21,8 +21,10 @@ using GtkSharp; namespace System.Windows.Forms { - public class Form:ContainerControl + public class Form : ContainerControl { + private Gtk.RadioButton firstRadioButton; + private int radioButtonsCount = 0; internal Gtk.Window win; @@ -306,24 +308,7 @@ namespace System.Windows.Forms public MainMenu Menu{ - /*else if (value.GetType () == - * typeof (System.Windows.Forms. - * MainMenu)) - * { - * MainMenu m = (MainMenu) value; - * this.owner.vbox.PackStart (m.mb, - * false, - * false, 0); - * m.mb.ShowAll (); - * this.owner.vbox.ReorderChild (m.mb, - * 0); - * this.owner.vbox.ShowAll (); - * list.Add (value); - * } */ - get{ - return mainMenu; - //throw new NotImplementedException (); - } + get{ return mainMenu; } set{ if (value == mainMenu){ return; @@ -332,7 +317,6 @@ namespace System.Windows.Forms this.vbox.Remove (mainMenu.Widget); this.vbox.ShowAll(); mainMenu.RemoveFromForm(); - // Quitar el menu de la ventana. } if (value != null){ this.vbox.PackStart(value.Widget, false, false, 0); @@ -341,11 +325,7 @@ namespace System.Windows.Forms value.AddToForm (this); } - mainMenu = value; - - - //throw new NotImplementedException (); - + mainMenu = value; } } @@ -640,6 +620,8 @@ namespace System.Windows.Forms protected override Size DefaultSize{ get{return new Size (300, 300);} } + + [MonoTODO] protected Rectangle MaximizedBounds{ @@ -685,6 +667,21 @@ namespace System.Windows.Forms DialogResult = DialogResult.Cancel; } } + protected override void OnControlAdded (ControlEventArgs e){ + base.OnControlAdded(e); + if (e.Control is RadioButton){ + if (radioButtonsCount == 0) + firstRadioButton = e.Control.Widget as Gtk.RadioButton; + else + (e.Control.Widget as Gtk.RadioButton).Group = + firstRadioButton.Group; + radioButtonsCount++; + } + } + [MonoTODO] + protected override void OnControlRemoved (ControlEventArgs e){ + base.OnControlRemoved (e); + } protected override void OnCreateControl (){ } |