[Gtk-sharp-list] Gtk# type problem

Mike Kestner mkestner@speakeasy.net
Tue, 26 Aug 2003 09:44:27 -0500

On Tue, 2003-08-26 at 08:45, Kris Luyten wrote:

> namespace Uiml.Rendering.GTKsharp
> {
> 	using Gtk;
> 	using GtkSharp;
> 	public class GtkRenderedInstance : Window, IRenderedInstance{
> 		public GtkRenderedInstance()
> 		{
> 			Application.Init();
> 		}

You have to either register a GType for your derived window type and
chain to the Gtk.Window (GLib.Type) ctor (see the subclass sample in the
sample dir for details)  or you need to do something like:

	public GtkRendererInstance () : base (WindowType.Toplevel)

The second approach is easier and probably what you are looking for.  If
you chain to a base () ctor, the assumption is that you are setting the
Raw property yourself with an instantiated native object "handle".

Mike Kestner <mkestner@speakeasy.net>