GTK+ Forums Forum Index GTK+ Forums
Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Simulating button click

 
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming
Author Message
killocan
Familiar Face


Joined: 23 Jan 2008
Posts: 18
Location: Brasil

PostPosted: Fri Feb 15, 2008 6:14 pm    Post subject: Simulating button click Reply with quote

Hey! i'm trying to simulate a button click on my application, but i got a problem :) i use gtk_button_clicked method to send a "clicked" "signal", but although i receive the event, my button doesn't "click". When i say "click" i mean "click animation" you know?! the GUI effect. I wanna to "looks like" i click on the button with mouse for example. Thanks :)
Back to top
kharrison
Familiar Face


Joined: 03 Oct 2007
Posts: 25
Location: Virginia (Northern)

PostPosted: Sun Feb 17, 2008 3:46 am    Post subject: Reply with quote

I got tired of trying to solve some of my own Gtk problems, saw yours and thought it was more interesting... LOL

Use this to simulate a button click:

GtkButton *button = gtk_button_new_with_label("Test Button");
gtk_signal_emit_by_name( GTK_OBJECT( button ), "activate" );

Kirk
Back to top
killocan
Familiar Face


Joined: 23 Jan 2008
Posts: 18
Location: Brasil

PostPosted: Mon Feb 18, 2008 2:44 pm    Post subject: :) Reply with quote

It's works! thanks a lot!
Back to top
Display posts from previous:   
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming All times are GMT
Page 1 of 1

 


Powered by phpBB © 2001, 2005 phpBB Group
CodeBB 1.0 Beta 2
Protected by Anti-Spam ACP