GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Thu Oct 30, 2014 5:30 pm

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Adding event signal to notebook makes disbaling lable,button
PostPosted: Tue Apr 09, 2013 1:21 pm 
Offline

Joined: Mon Mar 25, 2013 5:15 pm
Posts: 2
I have added "event" signal to notebook1 by using following code,


g_signal_connect(GTK_OBJECT(notebook1), "event",G_CALLBACK(admin_idle_timer), NULL);

void admin_idle_timer()
{
printf("Keyboard or mouse event occurred inside notebook1")
}

In notebook1, i have designed with lables , text box and buttons using glade tool...

During execution of "g_signal_connect(GTK_OBJECT(notebook1), "event",G_CALLBACK(admin_idle_timer), NULL);"
it makes label and buttons invisble but keyboard and mouse event are captured.

But Problem is label and buttons become invisible but it should be visible.
Kindly help me out for the above issue.

Thanks,
Silambarasan


Top
 Profile  
 
 Post subject: Re: Adding event signal to notebook makes disbaling lable,bu
PostPosted: Wed Apr 10, 2013 8:57 pm 
Offline
Never Seen the Sunlight

Joined: Thu Mar 24, 2011 2:10 pm
Posts: 328
Location: Sydney, Australia
firstly don't cast to GTK_OBJECT as it is GTK_WIDGET that uses the event signal and in fact GTK_OBJECT is not part of the hierarchy of GTK_NOTEBOOK.
second make sure your callback function matches the prototype of the signal (see https://developer.gnome.org/gtk3/3.3/GtkWidget.html#GtkWidget-event)
Thirdly this signal is being emitted for every event, not just key-press and mouse clicks, so you are using the wrong callback.

I think it is not displaying them as you are interfering with the propagation of the signals that render items within the notebook.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 14 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group