| Top |
GObject
╰── GInitiallyUnowned
╰── CtkWidget
╰── CtkContainer
╰── CtkBox
╰── CtkVBox
A CtkVBox is a container that organizes child widgets into a single column.
Use the CtkBox packing interface to determine the arrangement, spacing, height, and alignment of CtkVBox children.
All children are allocated the same width.
CtkVBox has been deprecated. You can use CtkBox with a “orientation”
set to CTK_ORIENTATION_VERTICAL instead when calling ctk_box_new(),
which is a very quick and easy change.
If you have derived your own classes from CtkVBox, you can change the
inheritance to derive directly from CtkBox, and set the “orientation”
property to CTK_ORIENTATION_VERTICAL in your instance init function,
with a call like:
1 2 |
ctk_orientable_set_orientation (CTK_ORIENTABLE (object), CTK_ORIENTATION_VERTICAL); |
If you have a grid-like layout composed of nested boxes, and you don’t need first-child or last-child styling, the recommendation is to switch to CtkGrid. For more information about migrating to CtkGrid, see Migrating from other containers to CtkGrid.
CtkWidget * ctk_vbox_new (gboolean homogeneous,gint spacing);
ctk_vbox_new has been deprecated since version 3.2 and should not be used in newly-written code.
You can use ctk_box_new() with CTK_ORIENTATION_VERTICAL instead,
which is a quick and easy change. But the recommendation is to switch to
CtkGrid, since CtkBox is going to go away eventually.
See Migrating from other containers to CtkGrid.
Creates a new CtkVBox.