[Gtk-sharp-list] Which Class to inheret from

Michael Hutchinson m.j.hutchinson at gmail.com
Mon Jul 12 21:47:03 EDT 2010


On Mon, Jul 12, 2010 at 9:44 PM, Michael Hutchinson
<m.j.hutchinson at gmail.com> wrote:
> On Mon, Jul 12, 2010 at 6:43 PM, Aaron Radich <aaron at radich.com> wrote:
>> I've got a custom .NET Windows froms control that I'm trying to port to
>> Mono/GTK#.  The control inherits from System.Windows.Forms.UserControl in
>> the .NET Windows Forms version.  What do you think I should use as the base
>> class type in mono/GTK#?
>
> Probably DrawingArea, though you can subclass Widget directly.

Hm, my mistake, looks like UserControl is intended as a "composite"
control, not a real custom control.

You should figure out how to recreate the control with GTK containers
and subclass the outermost container. Note that the GUI designer in MD
can also be used to design composite controls.

-- 
Michael Hutchinson
http://mjhutchinson.com


More information about the Gtk-sharp-list mailing list