[Gtk-sharp-list] Drawingarea shows nothing

monowiki www.carrotsoft at gmail.com
Sat Mar 23 14:09:18 UTC 2013

I'd like to stroke on Drawingarea using Cairo.
My code worked, but it shows nothing.
Next code I created is to draw a line on the drawingarea.


using System;
using Gtk;

public partial class MainWindow: Gtk.Window
	public MainWindow (): base (Gtk.WindowType.Toplevel)
		Build ();
	protected void OnDeleteEvent (object sender, DeleteEventArgs a)
		Application.Quit ();
		a.RetVal = true;
	protected void OnExposeEvent (object o, Gtk.ExposeEventArgs args)
		Cairo.Context cxt = Gdk.CairoHelper.Create(da.GdkWindow);
		cxt.MoveTo (40,50);
		this.GdkWindow.Clear ();
A red line should be drawn on this window...

Any ideas?

View this message in context: http://mono.1490590.n4.nabble.com/Drawingarea-shows-nothing-tp4659137.html
Sent from the Mono - Gtk# mailing list archive at Nabble.com.

More information about the Gtk-sharp-list mailing list