GTK_表组建,Packing Tables
GTK__表组装,Packing Tables
homogeneous 是 TRUE,表格框的大小都调整为表中最大构件的大小,也就是每个格一样大。
homogeneous 为FALSE,每个表格框将会按照同行中最高的构件,
与同列中最宽的构件来决定自身的大小,也就是同行、同列的一样大。
GtkWidget *gtk_table_new( guint rows, guint columns, gboolean homogeneous );
homogeneous 是 TRUE,表格框的大小都调整为表中最大构件的大小,也就是每个格一样大。
homogeneous 为FALSE,每个表格框将会按照同行中最高的构件,
与同列中最宽的构件来决定自身的大小,也就是同行、同列的一样大。
void gtk_table_attach( GtkTable *table, // 表 GtkWidget *child, // 构件 guint left_attach, // 最左的X坐标 guint right_attach, // 最右的X坐标 guint top_attach, // 最上的Y坐标 guint bottom_attach, // 最下的Y坐标 GtkAttachOptions xoptions, // GTK_FILL、 GTK_SHRINK、 GTK_EXPAND GtkAttachOptions yoptions, // 表大于构件,扩;表小于构件,缩;扩展表空间 guint xpadding, guint ypadding ); // 简单版,X及Y选项默认为GTK_FILL | GTK_EXPAND,X和Y的padding则设为0。 void gtk_table_attach_defaults( GtkTable *table, GtkWidget *widget, guint left_attach, guint right_attach, guint top_attach, guint bottom_attach ); // 插入行空白,行的下边 void gtk_table_set_row_spacing( GtkTable *table, guint row, guint spacing ); // 插入列空白,列的右边 void gtk_table_set_col_spacing ( GtkTable *table, guint column, guint spacing ); // 所有的行或/和列设置相同的间隔 void gtk_table_set_row_spacings( GtkTable *table, guint spacing ); void gtk_table_set_col_spacings( GtkTable *table, guint spacing );