Re: Threads ?:(



Le samedi 19 Novembre 2005 17:36, congo imafexbb sk a écrit :
> Hi,
>    i had problems with images.Now it's fine . But now i got the problem.I
> have myDrawingArea :) but when i want to display images in sequence and
> each after a second  i can't. It is true that i tried it wrong but how
> to do it ? I tried the sleep() function but it it definitelly wrong :)
> How does it work in gtkmm please.
>          Jan Vongrej
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list
> 

Hi,

I think you should try with timers, like :
		sigc::connection connec = Glib::signal_timeout().connect( 
			sigc::bind(  sigc::mem_fun( *this, &CYourClass::changePicture ), 0  ), 
			1000   );

1000 means 1 seconde.
This code must be written in a method of your class.
See also http://www.gtkmm.org/docs/glibmm-2.4/docs/reference/html/classGlib_1_1SignalTimeout.html.

-- 

Yolan Chériaux 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]