Re: [gtk-list] Re: Label wont show right.



> So, my best advice is that you should call the 
> while (gtk_events_pending()) stuff not just once at the beginning
> of your processing, but occasionally during the execution of
> your long-processing code. (If possible). This will have the
> nice side effect that your window will get redrawn if it 
> is obscured during the processing.
> 
> The other thing to do is:
> 
> 	while(gtk_event_pending())
>  	  gtk_main_iteration();
> 
> 	gdk_flush ();
>         gtk_widget_draw (label);
> 
> Which draws the label immediately instead of waiting for it
> to get exposed by Expose events.
> 
> Regards,
>                                         Owen
Hello,
	I really hate to ask for help over the same problem this many times, but i really dont know how to get this done right. I've tried just about everything. here's one of the many ways i tried
	
	gtk_widget_draw(label);
	while(!GTK_WIDGET_VISIBLE(label));
	while(gtk_event_pending())
		gtk_main_iteration();
	gdk_flush();

	I also had while(gtk_event_pending())
			gtk_main_iteration(); all over inside the processing code like suggested. So as far as gtk concerns , the request for drawing this label is sent to the server?. I also put while(!GTK_WIDGET_VISIBLE(label)) all over the place..One lasthing i'd like to t
ry is to do XSync() myself, but i have trouble getting *display out of GtkWidget *. Can you show me the cast to get *display out of the GtkWidget struct if thats possible?, or any other way to make sure that the label is drawn before it goes to the proces
sing codes. I dont know if you have tested the codes i previously posted. It behaves like this: the label is shown about 2-3 times, then just misteriously disappeared after that. The window's created and all, the label just isnt drawn on it. Again, thank 
you for your patience.
							htn



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