Re: emulating a button click by software



 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);

Cheers,
 Ricardo

Carlos Lacasta wrote (@ Segunda, 4 de Dezembro de 2006 23:23):
> 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
>
>
>
-- 
'I believe in getting into hot water; it keeps you clean."
		-- G. K. Chesterton



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