Re: Layout help
- From: Wolfgang Sourdeau <wolfgang iNsu com>
- To: mvogt juptech com
- Cc: gtk-list gnome org
- Subject: Re: Layout help
- Date: Tue, 4 Jul 2000 18:55:42 -0400 (EDT)
> So, are there any web pages which contain tips or tricks for controlling
> layout in fine detail (other than the documentation on www.gtk.org)?
The documentation on developer.gnome.org ? ;-)
>
> An example of what I would like to be able to do: constrain the top half of
> a vbox to remain at the original vertical size, while allowing a resize to
> change the vertical dimension of the lower half of the vbox.
There are many ways to achieve this.
The easier would be to use a GtkFixed as a container in place of your
GtkBox. This way, you can add widgets to it with gtk_container_add and
set their position with get_widget_set_uposition.
If you still want to use a GtkBox (which is the better Gtk way of doing
things anyway I think), you can configure your gtkbox to not be
homogeneous and you can configure the behaviour of the gtkbox
regarding your widgets with gtk_box_pack_{start,end}.
>From doc:
void gtk_box_pack_start (GtkBox *box, GtkWidget *child,
gboolean expand, gboolean fill, guint padding);
expand : TRUE if the new child is to be given extra space allocated to
box. The extra space will be divided evenly between all children of
box that use this option.
fill : TRUE if space given to child by the expand option is actually
allocated to child, rather than just padding it. This parameter has no
effect if expand is set to FALSE. A child is always allocated the
full height of a GtkHBox and the full width of a GtkVBox. This option
affects the other dimension.
padding : extra space in pixels to put between this child and its
neighbors, over and above the global amount specified by spacing in
GtkBox. If child is a widget at one of the reference ends of box,
then padding pixels are also put between child and the reference edge
of box.
Wolfgang
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]