[Gtk-sharp-list] Widgets and Dialogs

Chris Howie cdhowie at gmail.com
Sat Aug 16 23:58:09 EDT 2008


On Sat, Aug 16, 2008 at 11:42 PM, Brett Senior
<brett_senior at yahoo.com.au> wrote:
> First I'd like to thank Chris Howie and Michael Hutchinson for their advice
> and patience in explaining dialogs and their uses to me.  The below is a
> response from Chris and although I've looked into dialogs, I'm not quite
> sure what Chris means.  Is it possible for someone to provide a link to some
> documentation I can read, or clarify the below at bit more ?
>
> > I believe that the preferred way of approaching this is to create a
> > widget containing all of the dialog widgets that you need and drop
> > that widget on a Window or Dialog as you need it.  This is, I believe,
> > what MonoDevelop does.  Then if you change your UI design later by,
> > for example, merging a bunch of windows into a notebook you can do so
> > very quickly by re-using the widgets you have.
>
> Thanks,
> Brett Senior.

What I mean is don't subclass Window or Dialog at all -- subclass Bin
or VBox or HBox or whatever widget makes the most sense.  Design the
widget to contain your dialog contents (basically what you would put
in the Window or Dialog, you're just doing it without the window
border).

Then creating a Window or Dialog is as easy as adding the widget
directly to the container and hooking up the event handlers.

-- 
Chris Howie
http://www.chrishowie.com
http://en.wikipedia.org/wiki/User:Crazycomputers


More information about the Gtk-sharp-list mailing list