Hi ! Just a small mail to say that I found a solution. Instead of using Gtk.Application.Invoke, I'm using GLib.TimeOut and It is working also on Windows ...
But I have another question ... I can't see a method a method to change the TimeOut period or intervall ... Any idea or possibilities ? Selon [EMAIL PROTECTED]: > Hi, > > Ive got trouble with Gtk# on Windows. Ive following the tutorial here > (http://www.mono-project.com/Responsive_Applications) in order to manager > refresh of my interface. > > //This method handles a event from a background tak which is executed after > Timer.Elasped event : > private void gereMiseAJour(object source, MiseAJourEventArgs args) > { > Debug.WriteLine(" gereMiseAJour ... ", DebugLevel.Information); > this._obj = args; > if (this._delMiseAJour != null) > { > Gtk.Application.Invoke(this._delMiseAJour); > } > } > > // The delegate Im using in the Gtk.Application.Invoke > private EventHandler _delMiseAJour; > > // Which is declared in the constructor > //[...] > this._delMiseAJour = new EventHandler(this.miseAJour); > //[...] > > // Here is the code in the miseAJour function > private void miseAJour(object sender, EventArgs args) > { > if (this._obj != null) > { > Debug.WriteLine(" MainWindow.miseAJour : " + > this._obj.ToString(), > DebugLevel.Information); > this._lblTexte1.LabelProp = "<b>" + this._obj.Texte1 + "</b>" > Debug.WriteLine(" MainWindow.miseAJour : " + > this._lblTexte1.get_Text(), DebugLevel.Information); > } > } > > As you can see the principe is : > -1- Get the event from the background and store the parameter, > -2- If delegate not null ==> call it threw Gtl.Application.Invoke, > -3- The delegate link to a methode that use the stored parameters to refresh > the > interface. > > It is working fine on Mono/Linux but on .Net/Windows, I have to select or > deselect the interface in order to make it refresh > There is a Debug.WriteLine in the miseAJour method. I can see in the trace > that > méthod is execute only when I do an action on the window ... > > _______________________________________________ Gtk-sharp-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
