[gtk-list] Force refresh/exposure




Thanks to all,

Some answers seemed to be a bit complicated (fork, threads...), and 
gtk_widget_draw doesn't work...
Finally, I found a very simple solution with gtk_widget_show_now.
So this look like:

	mntbox=gtk_window_new(GTK_WINDOW_DIALOG);
	gtk_window_position(GTK_WINDOW(mntbox), GTK_WIN_POS_CENTER);
	gtk_window_set_title(GTK_WINDOW(mntbox), "Your title");
	gtk_container_border_width(GTK_CONTAINER(mntbox), 10);
	gtk_grab_add(mntbox);

	label=gtk_label_new("Your text");
	gtk_container_add(GTK_CONTAINER(mntbox), label);
	gtk_widget_show_now(label);
	gtk_widget_show_now(mntbox);

	while (gtk_events_pending())
		gtk_main_iteration();
	
	waitpid(pid, NULL, 0);
	gtk_widget_destroy(mntbox);


Manu
Gtk Explorer : www.chez.com/manuhp/gxplor



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