public bool AddChild()
{
if (box == null) {
box = new Gtk.HBox ();
Add (box);
}
if (box.Children.Length == 0) {
if (button1 == null)
button1 = new Gtk.Button ("button1");
box.Add (button1);
return true;
} else if (box.Children.Length == 1) {
if (button2 == null)
button2 = new Gtk.Button ("button2");
box.Add (button2);
return true;
} else
return false;
}
public TestMain() { TestWindowAccessibleFactory.Init (); window = new TestWindow ("At-spi-sharp test application"); window.AddChild (); window.SetDefaultSize (600, 400); window.DeleteEvent += new DeleteEventHandler (WindowDelete); window.ShowAll (); }