[Gtk-sharp-list] Drawing a string

Aaron Oxford aaron at hardwarehookups.com.au
Sun Mar 11 21:54:53 EDT 2007

Thanks again Michael. I've replied inline again, and I'm posting this 
back to the list for reference of people like me in the future.

At 12:27 PM 12/03/2007, you wrote:
>Hi Aaron,
>Is this the only Mono installer you've run on Windows? You may be
>using a mixture of incompatible assemblies or something like that. If
>you're developing in VS you need the installer that installs GTK# into
>the .NET GAC -- the Mono runtime maintains a separate GAC.

Yep. I haven't installed Mono, just the Gtk# SDK 2.8.3. In any case, 
I seem to now be getting some crap on the screen, and it redraws on 
resize etc, so I must be getting close to having it going.

>Yep, the number of different and incompatible Windows and Contexts can
>get confusing. But as long as you build up bit by bit and compile
>frequently, the compiler's strong typing should help to sort things
>I'm surprised that the VS code completion hasn't helped with this.

Code completion helps a lot, it's just not clear what's what - some 
CodeDOM comments would be immensely helpful ;-)

>> >Also, the Gtk.DotNet namespace (not sure what assembly it's in)
>> >provides a way to get a System.Drawing.Graphics context from
>> >Gdk.Drawable, so you can actually use a Graphics object with GTK#.
>>That wouldn't be cross-platform friendly though would it?
>Actually, Mono implements System.Drawing quite well, via a Cairo-based
>GDI+ implementation. The main intention of this is to ease porting.

OK, so am I now likely to run into problems with the straight Gdk 
drawing routines I've got going? I still have to figure out exactly 
how to use Pango as well, although I am seeing some text floating in 
the top left corner of the window.

Well, I probably should say that I have managed to get a window 
layout, functioning toolbar and menu, and some manual drawing done 
within 2 working days of picking up the code - please don't take my 
comments as bitching, I am quite impressed with my overall progress 
despite getting snagged on some things I would have thought were 
easy. I myself probably should have figured out things like how 
Gtk.DrawingArea extends/contains Gdk.Window earlier, by reading more 
and coding less.

Now to figure out why everthing is black and how to interact with the mouse...


Aaron Oxford   -   aaron+hardwarehookups .com .au
Director, Innovative Computer Solutions (Aust) Pty. Ltd.
49 Maitland Rd, Mayfield, NSW 2304 Australia
Developer, SourceForge project VioLet Composer

More information about the Gtk-sharp-list mailing list