Re: ReFreshing a Window



On Tue, 2008-05-13 at 18:25 +0200, Dimitri Holz wrote:
> Dimitri Holz schrieb:
> > I use a resize() - methode to change a size of my window, but I do it in 
> > a do-while-trails to see the change-effect:
> >
> > void MyWindow::change_size()
> > {
> >     int x=100, y=100;
> >         do
> >         {           
> >             MyWindow::resize(x, y);
> >             .......................................................
> >             x++;
> >             y++;
> >         }while(x<800||y<800);       
> > }
> >
> > but the problem is that you see only the first and the last size and I 
> > can`t find a GtKmm-methode for refresh a window like    ::refresh()   ; 
> > or   ::reload()    or so. How can I solve this problem?
> > _______________________________________________
> > gtkmm-list mailing list
> > gtkmm-list gnome org
> > http://mail.gnome.org/mailman/listinfo/gtkmm-list
> >
> > ANOTHER PROBLEM: the same code without loops: there are 2 buttons in the window and after resize they stay at the same place with the same size, only after the next event they refreshes theyselfes. How can you update them?

its nothing to do with loops.

all GUI applications have this structure:

	main () {

		... do some setup ....
	
	        while (no_reason_to_exit) {

		    GUI_Toolkit_waits_for_events ();
	            GUI_Toolkit_calls_your_event_handlers ();
	            GUI_Toolkit_updates_windows();
	        }


		... do some shutdown stuff ...

	}

as you can hopefully see, nothing that you do inside any code you write
for an event handler (whether its a button press, or an idle handler or
whatever else) will be visible until the *next* iteration of the GUI
toolkit's "update windows" step.





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