Re: Help



>> Can any one tell me how to show a widget after a timer runs out but not at
>> the execution of the application?
>> -r
>If I understand you 
>Try to do 
>while (gtk_events_pending())
>  gtk_main_iteration

i don't think that this is what he meant. i think he wants:

  1) program starts
  2) gtk_init()
  3) creates some widgets
  4) show()'s most of the widgets
  5) gtk_run()
  .  
  .
  .  <some number of seconds>
  6) show() some other widgets

the answer is to do this between steps 4 and 5:

    gtk_timeout_add (msecs, function, argument);

and within `function':

    gint function (void *arg)
    {
         other_widget1->show ();
	 other_widget2->show ();

	 return FALSE; /* don't execute this function again */
    }
    
--p  




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