gtk_table_attch与gtk_grid_attach的区别
button = gtk_button_new_with_label (“Short fat button”);
gtk_table_attach (GTK_TABLE (table), button, 0, 2, 3, 4, xoptions, yoptions, 0, 0);
0—2–3—4
左 右 上 下
/* 横线从左边的0移到右边的2,竖线从上边的3移到下边的4 */
gtk_grid_attach (GTK_GRID (grid), button, 0, 3, 2, 1);
/* 横线起点是0,向右增加2个格位,竖线起点是3,向下增加1个格位 */
grid还要有下面的两句才能作用
gtk_grid_set_row_homogeneous(GTK_GRID(grid), TRUE);
gtk_grid_set_column_homogeneous(GTK_GRID(grid), TRUE);
gtk_table_attach (GTK_TABLE (table), button, 左起点, 右终点, 上起点, 下终点, xoptions, yoptions, 0, 0);
gtk_grid_attach (GTK_GRID (grid), button, 左起点, 上起点, 横增量, 竖增量);