[Gtk-sharp-list] problems with GdkWindow
Charles Iliya Krempeaux
charles@reptile.ca
27 Feb 2003 08:29:33 -0800
Hello,
If I remember correctly,.... You have to "Show" (or "ShowAll")
your Widget/Window/Whatever before a Gdk.Window is created.
So... try the following...
Application.Init();
win.ShowAll();
Gtk.Window win = new Gtk.Window("scrolling");
Gdk.Window gdkwin = win.GdkWindow;
Application.Run();
(Where the Gdk.Window stuff comes after the "ShowAll".)
Hope that helps.
See ya
On Thu, 2003-02-27 at 01:21, Thomas 'Dent' Mirlacher wrote:
> hi list,
>
> running this testcase fails:
>
> using Gtk;
> using Gdk;
>
> public class Test {
> public static void Main(string[] args)
> {
> Application.Init();
>
> Gtk.Window win = new Gtk.Window("scrolling");
> Gdk.Window gdkwin = win.GdkWindow;
>
> win.ShowAll();
>
> Application.Run();
> }
> }
>
> ... with the exception:
>
> Unhandled Exception: System.NullReferenceException: A null value was found where an object instance was requiredin (unmanaged) 06 GtkSharp.ObjectManager:gtksharp_get_type_name (intptr)
> in <0x00004> 06 GtkSharp.ObjectManager:gtksharp_get_type_name (intptr)
> in <0x00050> 00 GtkSharp.ObjectManager:CreateObject (intptr)
> in <0x000b3> 00 GLib.Object:GetObject (intptr)
> in <0x0004e> 00 Gtk.Widget:get_GdkWindow ()
> in <0x0004f> 00 .Test:Main (string[])
>
>
> thanks for any ideas, help ...
>
> ++Thomas
--
Charles Iliya Krempeaux, BSc
charles@reptile.ca
________________________________________________________________________
Reptile Consulting & Services 604-REPTILE http://www.reptile.ca/