Re: timer



Aaron Yang wrote:
hi everyone,

  if I created a button that waits for the user to
click, is it possible to have a timer that can
constantly send "clicks" to the button without the
user  pressing the mouse?
  if this is possible, can anyone show me how?

Use g_timeout_add to register a function that is called after a given time. That functio can return TRUE to get itself called repeatedly after the same time. From your timeout function, call gtk_widget_activate(button) to send a click on the button.

--
Tim Evans
Applied Research Associates NZ
http://www.aranz.com/



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