Re: emulating a button click by software

 Already replied to you:

 Try sending an "activate" signal and see if that works. Otherwise, you may 
have to do a hack like:

button->depressed = TRUE;
gtk_widget_queue_draw (button);
install a gtimeout for 250 ms or so

and in timeout:
button->depressed = FALSE;
gtk_widget_queue_draw (button);


lacasta ific uv es wrote (@ Segunda, 4 de Dezembro de 2006 23:14):
> Hello,
> I am trying to emulate a button click by software. The idea is that I
> have an application that reacts when a button-like (toggle_button,
> radio_button) widget is clicked, and I would like to make it believe
> that one of those buttons have been clicked. I've tried with
> gtk_button_toggle() with a radio button (also with
> gtk_button_clicked() to see whether that was triggering something
> else) but to no avail. The program reacts to the signal, but the
> widget stays the same, that is the radio button does not change on the
> window. How can I do that ?
> Regards,
> Carlos

We will have solar energy as soon as the utility companies solve one
technical problem -- how to run a sunbeam through a meter.

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