1

テーブル内のウィジェットの位置をどのように知ることができるかを理解しようとしています。子ウィジェットを含むテーブルがあります。

tbl = gtk_table(rows=2, columns=2) 
eb = gtk_event_box()
gtk_table_attach(tbl, eb, 0, 1, 0, 1) 

テーブル内のイベントボックスの位置を確認するにはどうすればよいですか?

4

1 に答える 1

3

テーブルの子プロパティをクエリします。

unsigned left, right, top, bottom;
gtk_container_child_get(GTK_CONTAINER(tbl), eb,
    "left-attach", &left,
    "right-attach", &right,
    "top-attach", &top,
    "bottom-attach", &bottom,
    NULL);
于 2012-01-02T08:56:35.917 に答える