[Gtk-sharp-list] Drawingarea shows nothing

Marcelo Belentani de Bianchi marcelobianchi at mail.com
Tue Mar 26 00:16:42 UTC 2013


I also experience some strange issues like that when i was starting to learn and i found very
usefull to disable the doublebuffering of the drawing area to have more control of what is
happening.  Also, i would also suggest you to add a button and draw only when the button 
is clicked .. the drawing area takes time to setup itself ... i don't know when the drawingArea
is really ready to draw. 

So what i did was basically ... 

public MainWindow (): base (Gtk.WindowType.Toplevel)
	// Build the main GUI
	Build ();
        // disable the doublebuffer
        // My drawing area is named canvas 
        this.canvas.DoubleBuffered = false;

Also, try this and also if this does not work, try to add a button and trigger the drawing of the drawing area from the button press event so that you are pretty sure that all GTK init is done. 


marcelobianchi at mail.com

At 25 Mar 2013 08:31:26 +0000 (UTC) from Kai Takahashi <www.carrotsoft at gmail.com>:
Thank you for your replying.

Now I just have removed "GdkWindow.Clear();" from the code,
but the window still shows nothing...

View this message in context: <a target="_blank" target="_blank" href="http://mono.1490590.n4.nabble.com/Drawingarea-shows-nothing-tp4659137p4659142.html">http://mono.1490590.n4.nabble.com/Drawingarea-shows-nothing-tp4659137p4659142.html</a>
Sent from the Mono - Gtk# mailing list archive at Nabble.com.
Gtk-sharp-list maillist  -  Gtk-sharp-list@<a target="_blank" target="_blank" href="lists.ximian.com">lists.ximian.com</a>
<a target="_blank" target="_blank" href="http://lists.ximian.com/mailman/listinfo/gtk-sharp-list">http://lists.ximian.com/mailman/listinfo/gtk-sharp-list</a>

More information about the Gtk-sharp-list mailing list