[Gtk-sharp-list] problems with GdkWindow
Miguel de Icaza
miguel@ximian.com
27 Feb 2003 12:53:46 -0500
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();
>
> well that doesn't seem to work (since the gtk window is created after it's shown :)
>
> second thing is, i can live with having to realize the window. but i definitely
> need the gdkwin before showing it (map, expose)
Hook up to the realized event of the Gtk.Window. At that point the
GdkWindow value is valid.
Miguel