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 

gtk_get_container ?

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


Joined: 27 Mar 2007
Posts: 26

PostPosted: Tue May 15, 2007 10:02 am    Post subject: gtk_get_container ? Reply with quote

Suppose there is a widget which is known to be child of a gtkcontainer, how to get the handle of this gtkcontainer from the child?

thankx
Back to top
openldev
Never Seen the Sunlight


Joined: 21 Sep 2005
Posts: 376
Location: State College, Pennsylvania

PostPosted: Tue May 15, 2007 3:53 pm    Post subject: Reply with quote

It all depends on what type of GtkContainer you are working with. You can use gtk_container_get_children() to get all of the container's children as a doubly-linked list.
Back to top
bil
Familiar Face


Joined: 27 Mar 2007
Posts: 26

PostPosted: Wed May 16, 2007 12:11 am    Post subject: Reply with quote

openldev wrote:
It all depends on what type of GtkContainer you are working with. You can use gtk_container_get_children() to get all of the container's children as a doubly-linked list.

May be I misunderstood what you said. If I could use gtk_container_get_children then I already have known that gtkcontainer and I did not need to find it.

I'm looking for the inverse problem, say,
a) I have a gtkentry and gtkfixed
b) use gtk_fixed_put to add gtkentry to gtkfixed
c) later, starting from the gtkentry, I would like to find which gtkfixed it is added.

any help?
Back to top
openldev
Never Seen the Sunlight


Joined: 21 Sep 2005
Posts: 376
Location: State College, Pennsylvania

PostPosted: Wed May 16, 2007 12:19 am    Post subject: Reply with quote

The GtkWidget structure contains a pointer to another GtkWidget object called "parent". This is the child's parent widget.
Back to top
bil
Familiar Face


Joined: 27 Mar 2007
Posts: 26

PostPosted: Thu May 17, 2007 8:22 am    Post subject: Reply with quote

Thanks, that's what I wnated.
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