Package: gtk

Function gtk:table-attach

Lambda List

gtk:table-attach (table child left right top bottom &key xoptions yoptions  xpadding ypadding)

Arguments

table -- a gtk:table widget to add a new widget to
child -- a gtk:widget child widget to add
left -- an unsigned integer with the column number to attach the left side of a child widget to
right -- an unsigned integer with the column number to attach the right side of a child widget to
top -- an unsigned ineger with the row number to attach the top of a child widget to
bottom -- an unsigned integer with the row number to attach the bottom of a child widget to
xoptions -- a gtk:attach-options value used to specify the properties of the child widget when the table is resized
yoptions -- same as xoptions, except this field determines behaviour of vertical resizing
xpadding -- an unsigned integer specifying the padding on the left and right of the child widget being added to the table
ypadding -- an unsigned integer with the amount of padding above and below the child widget

Details

Adds a child widget to a table. The number of cells that a child widget will occupy is specified by the arguments left, right, top and bottom. These each represent the leftmost, rightmost, uppermost and lowest column and row numbers of the table. Columns and rows are indexed from zero.

The xoptions and yoptions keyword arguments have the default value '(:expand :fill). The xpadding and ypadding keyword arguments have the default value 0.

Examples

To make a button occupy the lower right cell of a 2 x 2 table, use
(gtk:table-attach table button 1 2 1 2)    
If you want to make the button span the entire bottom row, use
(gtk:table-attach table button 0 2 1 2)    

Lisp implementation

The C library has the gtk_table_attach_default () function. This function is included in the Lisp library via keyword arguments with default values for the gtk:table-attach function.

Warning

The gtk:table-attach function has been deprecated since version 3.4 and should not be used in newly written code. Use the gtk:grid widget with the gtk:grid-attach function. Note that the attach arguments differ between those two functions.
 

See also

2024-6-27