[Gtk-sharp-list] Label refresh on a Gtk.Window used as SplashScreen

Mattia Vitturi m.vitturi at gmail.com
Thu Aug 18 11:52:47 EDT 2011

Hello everyone!

I'm working on a sort of splashscreen and I am facing some problems.
On my splashscreen I've got a label that should be refreshed every second to
add a dot (from "Loading . ." to "Loading . . ." for example).

So, on my splashscreen constructor I've got these lines:

_label = new Label { UseMarkup = true, Xalign = 0, Text = "Loading .", };
_timer = new Timer(TimerCallback, null, 0, 1000);

...and in the same class, I've got:

private void TimerCallback(object state)
	_label.Text += " .";		

In a BackgroundWorker I've got the other actions to be accomplished by the
application, before drawing the MainShell (I use Moonlight.Desktop for that
purpose, but that's another story).
Everything runs smooth, but ... well, after 3 dots, no more of them are
added. I'm pretty sure the TimerCallback is still being called, cause on the
terminal I can see the Dotting line written every second.
Obviously it's not acceptable that the Label stops doing its job, cause
...well, someone can think the application is freezed.

Any idea?
Am I forgetting some properties to set?


View this message in context: http://mono.1490590.n4.nabble.com/Label-refresh-on-a-Gtk-Window-used-as-SplashScreen-tp3752947p3752947.html
Sent from the Mono - Gtk# mailing list archive at Nabble.com.

More information about the Gtk-sharp-list mailing list