On 15/05/12 11:56, Tristan Van Berkom wrote:
Are you using GTK+ 3 ?
Still on GTK+ 2.0.

If so, use GtkGrid instead... possibly just that will fix things for you.

Short of that, if I understand correctly, you have a target state/configuration
of a GtkTable (or GtkGrid), if you construct the table in the target
configuration
from scratch, I take it things work as you want... but dont work properly
after performing some kind of a transformation to reach your target
state...
That's about it.
... perhaps it's worth trying an extra call to gtk_widget_queue_resize()
after modifying your table.

I'm trying that.   I have signals connected thus;

    g_signal_connect(G_OBJECT(p->canvas), "expose-event",
             G_CALLBACK(&plot_expose_event), p);

    g_signal_connect(G_OBJECT(p->canvas), "select-item",
             G_CALLBACK(&plot_select_event), p);

and get the plot_select_event() routine to calculate and set new canvas sizes with

gtk_plot_canvas_set_size(GTK_PLOT_CANVAS(p->canvas), width, height);

then call gtk_widget_queue_resize(GTK_WIDGET(p->table));

This causes plot_expose_event() to get called, which calls gtk_plot_canvas_paint(GTK_PLOT_CANVAS(canvas));

But the table rows seem to expand to the largest canvas and don't seem to take on variable heights.

Feel I've been around and around the mulberry bush on this ;-)

Regards,
James.

On Mon, May 14, 2012 at 9:21 PM, James Steward
<jamesstew...@optusnet.com.au>  wrote:
Hi,

I have an application with a tabbed view.  On two tabs I have a table, one
is a 2x2 table, the other a 3x1 table (3 rows).

In each cell is a canvas that has a gtk plot.

I want to be able to click one of the plots in the 3x1 table and change the
canvas size to 2/3 the original, with the other two canvases being 1/6 the
original size.

After redrawing and resizing and mucking about, I can't get the table rows
to be different sizes, accommodating the different sized canvases properly,
even though I have gtk_table_set_homogeneous (table, FALSE);

Any clues how to do this?

Regards,
James.
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to