This is _exactly_ what I was looking for ! Thanks a lot to have answered my SOS.
Vincent
Antonio Guti�rrez Mayoral a �crit :
Hello,
See Gtk.ThreadNotify Class on Monodoc manual, it includes an example.
Saludos,
Antonio
El mi�, 09-03-2005 a las 10:00 +0100, Vincent Arnoux escribi�:
Sorry I made a mistake in the code: I am using the "ThreadStart" class to create the thread. Doesn't anyone has a track for me to follow ?
Vincent class myApp { Label myLabel;
public static void Main (string[] args) { new myApp (); }
public myApp() { //build a Gtk# window an add a label called myLabel
Thread oThread = new Thread(new ThreadStart(this.LongComputation)); oThread.IsBackground = true; oThread.Start(); }
public void LongComputation() { for (int i = 0; i < 100000000000000; i++) myLabel.Text = "#" + i; } }
Vincent Arnoux a �crit :
Hello,
I start a large computation in a thread of my program, and I want this thread to update a label. I know this looks like a classical issue, but I can't find an easy solution. Can you please give me a solution, or point me towards a link ?
...
Regards, Vincent _______________________________________________ Gtk-sharp-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
_______________________________________________
Gtk-sharp-list maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
_______________________________________________ Gtk-sharp-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
