[Gtk-sharp-list] Event problems for resizing
PROUST Yohann
Yohann.PROUST at egis.fr
Mon May 31 04:03:39 EDT 2010
Hi
The configure event is fired when the widget's window (but not the widget itself) is resized or moved. That's why you don't see it fired.
To detect a widget resizing, you should try the SizeAllocate event, or better: override the default handler OnSizeAllocated in your custom widget.
Hope this helps
Yohann
________________________________
De : gtk-sharp-list-bounces at lists.ximian.com [mailto:gtk-sharp-list-bounces at lists.ximian.com] De la part de Indrid Cold
Envoyé : samedi 29 mai 2010 16:49
À : gtk-sharp-list at lists.ximian.com
Objet : [Gtk-sharp-list] Event problems for resizing
I'm making a custom widget which contains an Image widget but allows the
image's size to grow and shrink as the widget is resized. The problem is
that I can't find an appropriate event to do this on.
I tried to use the Expose event, but as changing the Image widget's pixbuf
forces it to be redrawn, the Expose event runs again, producing a sort of
infinite loop.
I tried the Configure event, which supposedly is fired whenever the widget
is resized or moved but it doesn't get fired at all (even if I use
[Glib.ConnectBefore]).
I tried the SizeRequest event, but it seems it only runs one in the
beginning and then never again even if the widget is resized.
How do you think I should do this? Is there another event which is more
appropriate, or a way to solve the problem of one of these three events?
--
View this message in context: http://mono.1490590.n4.nabble.com/Event-problems-for-resizing-tp2235712p2235712.html
Sent from the Mono - Gtk# mailing list archive at Nabble.com.
_______________________________________________
Gtk-sharp-list maillist - Gtk-sharp-list at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20100531/96ef3cbd/attachment-0001.html
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: disclaimer.txt
Url: http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20100531/96ef3cbd/attachment-0001.txt
More information about the Gtk-sharp-list
mailing list