|
|
| Author |
Message |
|
|
bil Familiar Face
Joined: 27 Mar 2007 Posts: 26
|
Posted: Tue May 15, 2007 10:02 am Post subject: gtk_get_container ? |
|
|
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
|
Posted: Tue May 15, 2007 3:53 pm Post subject: |
|
|
| 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
|
Posted: Wed May 16, 2007 12:11 am Post subject: |
|
|
| 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
|
Posted: Wed May 16, 2007 12:19 am Post subject: |
|
|
| 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
|
Posted: Thu May 17, 2007 8:22 am Post subject: |
|
|
| Thanks, that's what I wnated. |
|
| Back to top |
|
 |
|