Mark Heckmann
Mark Heckmann

Reputation: 11431

how can I find out about child widgets position in a gtk_table

I try to figure out how can I find out about the position of a widget in a table. I have a table containing a child widget:

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

How can I find out what the position of the eventbox in the table is?

Upvotes: 1

Views: 1294

Answers (1)

ptomato
ptomato

Reputation: 57870

Query the table's child properties:

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);

Upvotes: 3

Related Questions