[Gtk-sharp-list] gereral question gtk# drawing rectangles
Paulo Pires
paulo.pires@vodafone.pt
Mon, 29 Nov 2004 23:53:36 +0000
Hi
Monodoc is an app, but there is also web documentation here ->
http://www.go-mono.com/docs/monodoc.ashx?tlink=3D6@ecma%3a827%
23DrawingArea%2f
Next time you reply, please CC it to gtk-sharp-list@ximian.com
Paulo Pires
Seg, 2004-11-29 =C3=A0s 22:54 +0100, muell_muell_@gmx.net escreveu:
> hi paulo and dan,
>=20
> at first a would like to say thanks that you try to help a gtk# newbie ;-=
)
>=20
> i have visit the mono-doc page and about drawingarea are realy rare=20
> information. :-(
> i found a Gtk+ tutorial in the internet, but it's in c and the importend=20
> functions are not discribed and the moste functions have other names.
>=20
> then i tryed to use GdkWindow with my drawingarea and there are realy=20
> functions for drawing rectangles and stuff like that. but the drawing=20
> functions need something called Gdk.GC (i think it's a garbage=20
> collector?) and this GC needs something called Gdk.Drawable. and for=20
> creating of Gdk.Drawable the constructor need a pointer, but a pointer=20
> to what?
>=20
> i post now my shortly sourcecode and i hope you can help me more:
> using Gtk;
> using Glade;
> using Gdk;
> using GLib;
> using System;
>=20
> public class fenster {
> Gtk.Window win;
> Gtk.DrawingArea da;
> // Gdk.Drawable dab;
>=20
> public fenster() {
> win =3D new Gtk.Window("test");
> da =3D new DrawingArea();
> win.Add(da);
> =20
> // without this line the program works
> da.GdkWindow.DrawRectangle(new Gdk.GC(new=20
> System.IntPtr()),true,10,10,300,300);
>=20
> win.ShowAll();
> }
> }
>=20
>=20
> public class gtk_test1 {
>=20
> public static void Main(string[] args) {
> new gtk_test1(args);
> }
>=20
> public gtk_test1(string[] args) {
> Application.Init();
> new fenster();
> Application.Run();
> }
> }