Re: Inserting in the middle of a hbox


Thomas Mailund Jensen <> :
>  E>   I would like to know wether it is possible to insert elements at
>  E> an arbirtrary (that is, not at the beginning or at the end)
>  E> position in a hbox?
> I don't think you can pack at arbitrary points directly, but you can
> reorder children of a box with 
> void       gtk_box_reorder_child       (GtkBox       *box,
>                                         GtkWidget    *child,
>                                         gint          position);

  Thank you for the tip. I guess I can find (in the docs) a way to
have the widget displayed only after the reordering has happened.

>  E>   Also, is there any way to delete an element from a hbox?
> I can't think of one...and I don't think there would probably
> cause all kinds of problems with the packing.

  Uh, oh; do you think I could do the following instead :

  - Get back the children of the hbox,
  - create a new hbox with only the wanted children.

  Does it sound possible (especially, the first step may not be
permitted by gtk)?

  Sorry for asking before consulting the docs (I can't go look in the
docs at the moment, being at work). 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]