Mercurial > repos > IBBoard.GtkSharp
comparison SimpleDialog.cs @ 39:35b88b848524
* Add simple dialog to add basic widgets to for use in WarFoundry
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Tue, 18 Oct 2011 20:58:49 +0100 |
parents | |
children | 7c15adc333ea |
comparison
equal
deleted
inserted
replaced
38:af65343516ba | 39:35b88b848524 |
---|---|
1 // This file (SimpleDialog.cs) is a part of the IBBoard.GtkSharp project and is copyright 2011 IBBoard | |
2 // | |
3 // The file and the library/program it is in are licensed and distributed, without warranty, under the GNU LGPL license, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license. | |
4 using System; | |
5 using Gtk; | |
6 | |
7 namespace IBBoard.GtkSharp | |
8 { | |
9 /// <summary> | |
10 /// Simple dialog that takes a set of widgets and puts them in the dialog's VBox. The dialog is a convenience | |
11 /// for doing the steps manually for each dialog required. | |
12 /// </summary> | |
13 public partial class SimpleDialog : Dialog | |
14 { | |
15 public SimpleDialog(string title, Window parent, DialogFlags flags, params Bin[] widgets) : base(title, parent, flags) | |
16 { | |
17 this.AddButton("Ok", ResponseType.Ok); | |
18 this.Build(); | |
19 foreach (Bin item in widgets) | |
20 { | |
21 VBox.PackEnd(item); | |
22 item.Show(); | |
23 } | |
24 } | |
25 } | |
26 } | |
27 |