gtk-sharp Gtk# is thread aware, but not thread safe; See the Gtk# Thread Programming for details. Gtk.Bin Gtk.IActivatable A widget that creates a signal when clicked on. The widget is generally used to attach to a function that is called when the button is pressed. The widget can hold any valid child widget. That is, it can hold most any other standard . The most commonly used child is the . using Gtk; using System; public class ButtonApp { public static int Main (string[] args) { Application.Init (); Window win = new Window ("Button Tester"); win.SetDefaultSize (200, 150); win.DeleteEvent += new DeleteEventHandler (Window_Delete); Button btn = new Button ("Click Me"); btn.Clicked += new EventHandler (btn_click); win.Add (btn); win.ShowAll (); Application.Run (); return 0; } static void btn_click (object obj, EventArgs args) { Console.WriteLine ("Button Clicked"); } static void Window_Delete (object obj, DeleteEventArgs args) { Application.Quit (); args.RetVal = true; } } Constructor Default parameterless constructor. This is the default constructor for the class. Constructor a child Constructs a button containing a specified Child widget. Constructor an object of type Internal constructor This is not typically used by C# code. Constructor a Creates a new containing the image and text from a stock item. The valid names of Stock items can be found in the class. If is unknown, then it will be treated as a simple label. This for example creates a stock OK button. It sets a localized label, a standard icon (choosed from your GTK theme), and the appropriate keyboard accelerator: Button b = new Button (Stock.Ok); Event GLib.Signal("activate") System.EventHandler Event launched when the is activated. Method System.Void Emits a signal to the given . Emits a signal to the given . Event GLib.Signal("clicked") System.EventHandler Event launched when the is clicked. Method System.Void To be added. To be added. To be added. Method System.Obsolete System.Void Emits a signal to the given . Emits a signal to the given . Event GLib.Signal("enter") System.EventHandler Event launched when the cursor enters the area. Property Gdk.Window To be added. To be added. To be added. Property GLib.Property("focus-on-click") System.Boolean Whether the button grabs focus when it is clicked with the mouse. a Method System.Void a to put the horizontal alignment in a to put the vertical alignment in Gets the alignment of the child in the button. A convenience method; shouldn't be Property GLib.GType GType Property. a Returns the native value for . Property GLib.Property("image") Gtk.Widget Child widget to appear next to the button text. A . Property GLib.Property("image-position") Gtk.PositionType Position of the image relative to the text. a . Property GLib.Property("label") System.String The text of the in the . The contained by the . If you want the Label to have a mnemonic you need to set to . Method System.Obsolete System.Void Emits a signal to the given . Emits a signal to the given . Event GLib.Signal("leave") System.EventHandler Event launched when the cursor leaves the area. Method Gtk.Button The text you want the to hold. Creates a widget with a child containing the given text. The newly created widget. Method Gtk.Button a Creates a labeled . a Constructor that creates a labeled . The label shows the string passed as parameter. Method GLib.DefaultSignalHandler(ConnectionMethod="OverrideActivated", Type=typeof(Gtk.Button)) System.Void Default handler for the event. Override this method in a subclass to provide a default handler for the event. Method GLib.DefaultSignalHandler(ConnectionMethod="OverrideClicked", Type=typeof(Gtk.Button)) System.Void Default handler for the event. Override this method in a subclass to provide a default handler for the event. Method GLib.DefaultSignalHandler(ConnectionMethod="OverrideEntered", Type=typeof(Gtk.Button)) System.Void Default handler for the event. Override this method in a subclass to provide a default handler for the event. Method GLib.DefaultSignalHandler(ConnectionMethod="OverrideLeft", Type=typeof(Gtk.Button)) System.Void Default handler for the event. Override this method in a subclass to provide a default handler for the event. Method GLib.DefaultSignalHandler(ConnectionMethod="OverridePressed", Type=typeof(Gtk.Button)) System.Void Default handler for the event. Override this method in a subclass to provide a default handler for the event. Method GLib.DefaultSignalHandler(ConnectionMethod="OverrideReleased", Type=typeof(Gtk.Button)) System.Void Default handler for the event. Override this method in a subclass to provide a default handler for the event. Method System.Obsolete System.Void Emits a signal to the given . Emits a signal to the given . Event GLib.Signal("pressed") System.EventHandler Event launched when the is pressed. Property GLib.Property("related-action") Gtk.Action To be added. To be added. To be added. Method System.Obsolete System.Void Emits a signal to the given . Emits a signal to the given . Event GLib.Signal("released") System.EventHandler Event launched when the is released. Property GLib.Property("relief") Gtk.ReliefStyle The for the . An instance of that represents the relief style of the . Method System.Void a , the horizontal position of the child; 0.0 is left aligned, 1.0 is right aligned. a , the vertical position of the child; 0.0 is top aligned, 1.0 is bottom aligned. Sets the alignment of the child. This has no effect unless the button's child is a or . Method System.Void To be added. To be added. To be added. Property GLib.Property("use-action-appearance") System.Boolean To be added. To be added. To be added. Property GLib.Property("use-stock") System.Boolean Whether the should use a . Gets a value indicating if the uses a . It is possible to create a from , which is recommended for consistency in apps. They also provide a and a key shortcut. Property GLib.Property("use-underline") System.Boolean Indicates if a mnemonic is associated with the . Gets a value indicating if the uses underline or not. Property GLib.Property("xalign") System.Single If the child of the button is a or , this property can be used to control its horizontal alignment. a ; 0.0 is left aligned, 1.0 is right aligned. Property GLib.Property("yalign") System.Single If the child of the button is a or , this property can be used to control its vertical alignment. a ; 0.0 is top aligned, 1.0 is bottom aligned.