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 : [email protected] 
[mailto:[email protected]] De la part de Indrid Cold
Envoyé : samedi 29 mai 2010 16:49
À : [email protected]
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  -  [email protected]
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list

Ce message et toutes les pièces jointes (ci-après le « message ») sont 
confidentiels et établis à l’intention exclusive
de ses destinataires. Toute utilisation de ce message non conforme à sa 
destination, toute diffusion ou toute publication,
totale ou partielle, est interdite, sauf autorisation expresse. Si vous recevez 
ce message par erreur, merci de le
détruire sans en conserver de copie et d’en avertir immédiatement l’expéditeur. 
Internet ne permettant pas de garantir 
l’intégrité de ce message, EGIS SA et ses filiales déclinent toute 
responsabilité au titre de ce message s’il a été 
modifié, altéré, déformé ou falsifié. Par ailleurs et malgré toutes les 
précautions prises pour éviter la présence de virus 
dans nos envois, nous vous recommandons de prendre, de votre côté, les mesures 
permettant d'assurer la non-introduction 
de virus dans votre système informatique. 

If you are not an intended recipient, please be advised that any use, 
dissemination, forwarding or copying of this email 
whatsoever is prohibited without EGIS SA and its subsidiaries' prior written 
consent. If you have received this email 
in error, please delete it without saving a copy and notify the sender 
immediately. Internet emails are not necessarily 
secured, and  declines responsibility for any changes that may have been made 
to this email after it was sent. While we 
take all reasonable precautions to ensure that viruses are not transmitted via 
emails, we recommend that you take your 
own measures to prevent viruses from entering your computer system.
_______________________________________________
Gtk-sharp-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list

Reply via email to