GtkTable

GtkTable

Functions

Properties

guint column-spacing Read / Write
gboolean homogeneous Read / Write
guint n-columns Read / Write
guint n-rows Read / Write
guint row-spacing Read / Write

Child Properties

guint bottom-attach Read / Write
guint left-attach Read / Write
guint right-attach Read / Write
guint top-attach Read / Write
GtkAttachOptions x-options Read / Write
guint x-padding Read / Write
GtkAttachOptions y-options Read / Write
guint y-padding Read / Write

Types and Values

struct GtkTable

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GtkObject
            ╰── GtkWidget
                ╰── GtkContainer
                    ╰── GtkTable

Implemented Interfaces

GtkTable implements AtkImplementorIface and GtkBuildable.

Includes

#include <gtk/gtk.h>

Description

Functions

gtk_table_new ()

GtkWidget *
gtk_table_new (guint rows,
               guint columns,
               gboolean homogeneous);

gtk_table_resize ()

void
gtk_table_resize (GtkTable *table,
                  guint rows,
                  guint columns);

gtk_table_attach ()

void
gtk_table_attach (GtkTable *table,
                  GtkWidget *child,
                  guint left_attach,
                  guint right_attach,
                  guint top_attach,
                  guint bottom_attach,
                  GtkAttachOptions xoptions,
                  GtkAttachOptions yoptions,
                  guint xpadding,
                  guint ypadding);

gtk_table_attach_defaults ()

void
gtk_table_attach_defaults (GtkTable *table,
                           GtkWidget *widget,
                           guint left_attach,
                           guint right_attach,
                           guint top_attach,
                           guint bottom_attach);

gtk_table_set_row_spacing ()

void
gtk_table_set_row_spacing (GtkTable *table,
                           guint row,
                           guint spacing);

gtk_table_set_col_spacing ()

void
gtk_table_set_col_spacing (GtkTable *table,
                           guint column,
                           guint spacing);

gtk_table_set_row_spacings ()

void
gtk_table_set_row_spacings (GtkTable *table,
                            guint spacing);

gtk_table_set_col_spacings ()

void
gtk_table_set_col_spacings (GtkTable *table,
                            guint spacing);

gtk_table_set_homogeneous ()

void
gtk_table_set_homogeneous (GtkTable *table,
                           gboolean homogeneous);

gtk_table_get_default_row_spacing ()

guint
gtk_table_get_default_row_spacing (GtkTable *table);

Gets the default row spacing for the table. This is the spacing that will be used for newly added rows. (See gtk_table_set_row_spacings())

Parameters

table

a GtkTable

 

Returns

the default row spacing


gtk_table_get_homogeneous ()

gboolean
gtk_table_get_homogeneous (GtkTable *table);

Returns whether the table cells are all constrained to the same width and height. (See gtk_table_set_homogenous())

Parameters

table

a GtkTable

 

Returns

TRUE if the cells are all constrained to the same size


gtk_table_get_row_spacing ()

guint
gtk_table_get_row_spacing (GtkTable *table,
                           guint row);

Gets the amount of space between row row , and row row + 1. See gtk_table_set_row_spacing().

Parameters

table

a GtkTable

 

row

a row in the table, 0 indicates the first row

 

Returns

the row spacing


gtk_table_get_col_spacing ()

guint
gtk_table_get_col_spacing (GtkTable *table,
                           guint column);

Gets the amount of space between column col , and column col + 1. See gtk_table_set_col_spacing().

Parameters

table

a GtkTable

 

column

a column in the table, 0 indicates the first column

 

Returns

the column spacing


gtk_table_get_default_col_spacing ()

guint
gtk_table_get_default_col_spacing (GtkTable *table);

Gets the default column spacing for the table. This is the spacing that will be used for newly added columns. (See gtk_table_set_col_spacings())

Parameters

table

a GtkTable

 

Returns

the default column spacing


gtk_table_get_size ()

void
gtk_table_get_size (GtkTable *table,
                    guint *rows,
                    guint *columns);

Returns the number of rows and columns in the table.

Parameters

table

a GtkTable

 

rows

return location for the number of rows, or NULL.

[out][allow-none]

columns

return location for the number of columns, or NULL.

[out][allow-none]

Since: 2.22

Types and Values

struct GtkTable

struct GtkTable;

Property Details

The “column-spacing” property

  “column-spacing”           guint

The amount of space between two consecutive columns.

Owner: GtkTable

Flags: Read / Write

Allowed values: <= 65535

Default value: 0


The “homogeneous” property

  “homogeneous”              gboolean

If TRUE, the table cells are all the same width/height.

Owner: GtkTable

Flags: Read / Write

Default value: FALSE


The “n-columns” property

  “n-columns”                guint

The number of columns in the table.

Owner: GtkTable

Flags: Read / Write

Allowed values: [1,65535]

Default value: 1


The “n-rows” property

  “n-rows”                   guint

The number of rows in the table.

Owner: GtkTable

Flags: Read / Write

Allowed values: [1,65535]

Default value: 1


The “row-spacing” property

  “row-spacing”              guint

The amount of space between two consecutive rows.

Owner: GtkTable

Flags: Read / Write

Allowed values: <= 65535

Default value: 0

Child Property Details

The “bottom-attach” child property

  “bottom-attach”            guint

The row number to attach the bottom of the child to.

Owner: GtkTable

Flags: Read / Write

Allowed values: [1,65535]

Default value: 1


The “left-attach” child property

  “left-attach”              guint

The column number to attach the left side of the child to.

Owner: GtkTable

Flags: Read / Write

Allowed values: <= 65535

Default value: 0


The “right-attach” child property

  “right-attach”             guint

The column number to attach the right side of a child widget to.

Owner: GtkTable

Flags: Read / Write

Allowed values: [1,65535]

Default value: 1


The “top-attach” child property

  “top-attach”               guint

The row number to attach the top of a child widget to.

Owner: GtkTable

Flags: Read / Write

Allowed values: <= 65535

Default value: 0


The “x-options” child property

  “x-options”                GtkAttachOptions

Options specifying the horizontal behaviour of the child.

Owner: GtkTable

Flags: Read / Write

Default value: GTK_EXPAND | GTK_FILL


The “x-padding” child property

  “x-padding”                guint

Extra space to put between the child and its left and right neighbors, in pixels.

Owner: GtkTable

Flags: Read / Write

Allowed values: <= 65535

Default value: 0


The “y-options” child property

  “y-options”                GtkAttachOptions

Options specifying the vertical behaviour of the child.

Owner: GtkTable

Flags: Read / Write

Default value: GTK_EXPAND | GTK_FILL


The “y-padding” child property

  “y-padding”                guint

Extra space to put between the child and its upper and lower neighbors, in pixels.

Owner: GtkTable

Flags: Read / Write

Allowed values: <= 65535

Default value: 0