Re: [Mono-list] DrawingArea needs to redraw signal??
On Tue, Nov 16, 2010 at 6:09 AM, Francisco M. Marzoa wrote: > Hello, > > Currently I'm handling the ExposeEvent -as Miguel de Icaza told me in a > prior answer- but I ignored that there're another way to do the same. I > assume that overriding OnExpose is not available through Monodevelop > interface designer, isn't it? So I should do something like: > > drawingarea1.OnExpose += MyOnExposeMethodDelegate You may also wish to use [ConnectBefore] on your event handler, and set RetVal to true, so that the default handler doesn't get called. All the GTK built-in behaviors are implemented as event handlers, but GTK offers a way to stop events from propagating to other handlers (set RetVal to true), so built-in handlers often "swallow" events. You can use ConnectBeforeAttribute to insert handlers before the built-ins. Note also that you should use the Drawable object from the expose event's Window property, not the widget's GdkWindow property. This is a temporary double-buffered surface. -- Michael Hutchinson http://mjhutchinson.com ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] DrawingArea needs to redraw signal??
Hello, Currently I'm handling the ExposeEvent -as Miguel de Icaza told me in a prior answer- but I ignored that there're another way to do the same. I assume that overriding OnExpose is not available through Monodevelop interface designer, isn't it? So I should do something like: drawingarea1.OnExpose += MyOnExposeMethodDelegate am I right? Thanks a lot, El 16/11/10 00:46, Michael Hutchinson escribió: > > Override OnExpose or handle the ExposeEvent event and inspect the > args.Event value. There you will find the invalidated region, and a > Window drawable. > ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] DrawingArea needs to redraw signal??
On Sat, Nov 13, 2010 at 9:21 AM, Francisco M. Marzoa wrote: > Hello again, > > In my application I've a DrawingArea. I use that DA's GdkWindow property > to create a Cairo.Context. I can draw on the DA but if I, for example, > resize the main window, the DA is erased. > > I assume I must redraw the DA in some events, isn't it? If this is the > case, the question is what signal(s) on the DA may I "catch" to redraw > when needed Override OnExpose or handle the ExposeEvent event and inspect the args.Event value. There you will find the invalidated region, and a Window drawable. -- Michael Hutchinson http://mjhutchinson.com ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list
[Mono-list] DrawingArea needs to redraw signal??
Hello again, In my application I've a DrawingArea. I use that DA's GdkWindow property to create a Cairo.Context. I can draw on the DA but if I, for example, resize the main window, the DA is erased. I assume I must redraw the DA in some events, isn't it? If this is the case, the question is what signal(s) on the DA may I "catch" to redraw when needed Thanks a lot in advance, ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list