//here's the calling code: Gtk.Dialog newSID = new UserDetails(this.window); newSID.Run(); newSID.Destroy(); //and here's the userDetails class stuff public UserDetails(Window parentWindow) : base("User Details", parentWindow, DialogFlags.Modal) { Glade.XML gxml = new Glade.XML (null, "DBAdminUtil.glade", "UserDetails", null); gxml.Autoconnect (this); this.window = (Gtk.Dialog)gxml.GetWidget("UserDetails"); } #region Event Handlers protected void on_btnOK_clicked(object o, EventArgs args) { //add to the database //set the properties so the caller can update the UI this.Hide(); } protected void on_btnCancel_clicked(object o, EventArgs args) { this.Hide(); } protected void on_txtName_changed(object o, EventArgs args) { this._displayName = txtName.Text; } #endregion