Menu fixes
[mono.git] / mcs / class / System.Windows.Forms / Gtk / RadioButton.cs
1 //              
2 //                      System.Windows.Forms.Frame
3 //
4 //                      Author: 
5 //                                              Joel Basson             (jstrike@mweb.co.za)
6 //
7 //
8
9 using System;
10
11 namespace System.Windows.Forms { 
12
13         
14         /// <summary>\r
15         /// Represents a Windows RadioButton control.\r
16         ///\r
17         /// </summary>\r
18         
19         
20         public  class RadioButton : ButtonBase {
21
22                 private static int initialized;
23                                 static Gtk.RadioButton first_radio_button;
24                         
25          public RadioButton(){
26                         
27          }
28  
29          internal override Gtk.Widget CreateWidget() {                  
30                                         initialized = initialized + 1;
31                                         if ( initialized == 1 ) {
32                  first_radio_button = new Gtk.RadioButton(null, "");
33                         return first_radio_button;
34             } 
35                                         else {
36                                                         return Gtk.RadioButton.NewWithLabelFromWidget(first_radio_button, "");
37             }
38                 }
39                                 
40                                 public override string Text {
41                                         get {
42                                                         return ((Gtk.RadioButton)Widget).Label; 
43                                         }
44                                         set {
45                                                                 ((Gtk.RadioButton)Widget).Label = value;
46                                         }
47                                 }
48      }
49 }