Hi,
the idea of two linked scrolled windows worked as intended. Defining the "viewport widget" as a scrolled window instead.
Using:
...
swin = gtk_scrolled_window_new (NULL, NULL);
horizontal = gtk_scrolled_window_get_hadjustment (GTK_SCROLLED_WINDOW (swin));
vertical = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (swin));
viewport = gtk_scrolled_window_new (horizontal, vertical);
gtk_container_set_border_width (GTK_CONTAINER (swin), 5);
gtk_container_set_border_width (GTK_CONTAINER (viewport), 5);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swin),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (swin), table1);
gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (viewport), table2);
vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 5);
gtk_box_pack_start(GTK_BOX (vbox), viewport, TRUE, TRUE, 0);
gtk_box_pack_start(GTK_BOX (vbox), swin, TRUE, TRUE, 0);
...
It almost looks the same as the Gtk2 original.
Going back to the documentation for GtkViewport.
Gtk2:
Properties
"hadjustment" GtkAdjustment* : Read / Write / Construct
"shadow-type" GtkShadowType : Read / Write
"vadjustment" GtkAdjustment* : Read / Write / Construct
Signals
"set-scroll-adjustments" : Action
and in Gtk3:
Properties
"shadow-type" GtkShadowType : Read / Write
(no signals)
Clearly GtkViewport changed significantly.
Thanks for your feedback!
Ciao
_______________________________________________ gtk-list mailing list gtk-list@xxxxxxxxx https://mail.gnome.org/mailman/listinfo/gtk-list