GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Fri Dec 19, 2014 12:33 am

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: gtk_get_container ?
PostPosted: Tue May 15, 2007 10:02 am 
Offline
Familiar Face

Joined: Tue Mar 27, 2007 8:56 am
Posts: 26
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


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 15, 2007 3:53 pm 
Offline
Never Seen the Sunlight

Joined: Wed Sep 21, 2005 3:07 am
Posts: 384
Location: Fairfax, Virginia
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.

_________________
Andrew Krause

Foundations of GTK+ Development: Buy now for only $31.49!


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 16, 2007 12:11 am 
Offline
Familiar Face

Joined: Tue Mar 27, 2007 8:56 am
Posts: 26
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?


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 16, 2007 12:19 am 
Offline
Never Seen the Sunlight

Joined: Wed Sep 21, 2005 3:07 am
Posts: 384
Location: Fairfax, Virginia
The GtkWidget structure contains a pointer to another GtkWidget object called "parent". This is the child's parent widget.

_________________
Andrew Krause

Foundations of GTK+ Development: Buy now for only $31.49!


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 17, 2007 8:22 am 
Offline
Familiar Face

Joined: Tue Mar 27, 2007 8:56 am
Posts: 26
Thanks, that's what I wnated.


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

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 2 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