gtk-sharp [00 24 00 00 04 80 00 00 94 00 00 00 06 02 00 00 00 24 00 00 52 53 41 31 00 04 00 00 01 00 01 00 71 EB 6C 55 75 52 9C BF 72 44 F7 A6 EA 05 62 84 F9 EA E0 3B CF F2 CC 13 2C 9C 49 0A B3 09 EA B0 B5 6B CE 44 9D F5 03 D9 C0 A8 1E 52 05 85 CD BE 70 E2 FB 90 43 4B AC 04 FA 62 22 A8 00 98 B7 A1 A7 B3 AF 99 1A 41 23 24 BB 43 25 F6 B8 65 BB 64 EB F6 D1 C2 06 D5 73 2D DF BC 70 A7 38 9E E5 3E 0C 24 6E 32 79 74 1A D0 05 03 E4 98 42 E1 9B F3 7B 19 8B 40 21 26 CB 36 89 C2 EA 64 96 A4 7C B4] 2.0.0.0 neutral Gtk# is thread aware, but not thread safe; See the Gtk# Thread Programming for details. A container which can hide its child A allows the user to hide or show its child by clicking on an expander triangle similar to the triangles used in a . Normally you use an expander as you would use any other descendant of ; you create the child widget and use to add it to the expander. When the expander is toggled, it will take care of showing and hiding the child automatically. using System; using Gtk; class DemoExpander : Gtk.Window { static void Main () { Application.Init (); new DemoExpander (); Application.Run (); } DemoExpander () : base ("Demo Expander") { this.BorderWidth = 10; this.DeleteEvent += new DeleteEventHandler (OnWindowDelete); VBox vbox = new VBox (); vbox.PackStart (new Label ("Expander demo. Click on the triangle for details."), false, true, 3); Expander expander = new Expander ("Details"); expander.Add (new Label ("Details can be shown or hidden.")); vbox.PackStart (expander, false, true, 3); this.Add (vbox); this.ShowAll (); } void OnWindowDelete (object sender, DeleteEventArgs a) { Application.Quit (); } } Special Usage There there are situations in which you may prefer to show and hide the expanded widget yourself, such as when you want to actually create the widget at expansion time. In this case, create a but do not add a child to it. The expander widget has which can be used to monitor its expansion state. using System; using Gtk; class DemoExpander : Gtk.Window { static void Main () { Application.Init (); new DemoExpander (); Application.Run (); } DemoExpander () : base ("Demo Expander") { this.BorderWidth = 10; this.DeleteEvent += new DeleteEventHandler (OnWindowDelete); VBox vbox = new VBox (); vbox.PackStart (new Label ("Expander demo. Click on the triangle for details."), false, true, 3); Expander expander = new Expander ("Details"); expander.Activated += new EventHandler (OnExpanded); vbox.PackStart (expander, false, true, 3); this.Add (vbox); this.ShowAll (); } void OnExpanded (object sender, EventArgs a) { Expander expander = sender as Expander; if (expander.Child == null) { expander.Add (new Label ("Details can be shown or hidden.")); expander.ShowAll (); } } void OnWindowDelete (object sender, DeleteEventArgs a) { Application.Quit (); } } Gtk.Bin Atk.Implementor GLib.IWrapper System.IDisposable Method System.Void Disposes the resources associated with the object. Method System.Void Default handler for the event. Override this method in a subclass to provide a default handler for the event. Constructor Internal constructor a a Constructor Internal constructor a a Constructor Creates a new expander with as its label. a a Property GLib.GType GType Property. a Returns the native value for . Property System.String The text of the label of the expander. a If the label text has not been set the return value will be . Setting the label will also clear any previously set labels. Property System.Boolean Whether the text of the label contains markup in Pango's text markup language. a , if the label's text should be parsed for markup Property System.Int32 Space to put between the label and the child. a Allowed values: >= 0 Default value: 0 Property System.Boolean The state of the expander. a Returns if the child widget is revealed. Property System.Boolean Whether an embedded underline in the expander label indicates a mnemonic. a , if underlines in the text indicate mnemonics Property Gtk.Widget The label widget for the expander. the label , or if there is none. This is the widget that will appear embedded alongside the expander arrow. Event System.EventHandler Emitted when the expander is toggled. Method Gtk.Expander To be added a a To be added