Scrolling a GtkScrolledWindow / linking GtkAdjustments

Hi all.

I'm trying to link the values of 3 adjustments, so that when a user scrolls in any of 3 treeviews, the other 2 treeviews scroll to the same point. I've connected to the 'value-changed' signal of one of the adjustments, which triggers:

sub on_test_comparison_scroll {
    my ( $self, $adjustment ) = @_;
    if ( $self->{test_run_scroll_lock} ) {
    $self->{test_run_scroll_lock} = 1;
    my $value = $adjustment->get_value;
    print "Value: $value\n";
    $self->{comparison_keys_adjustment}->set_value( $value );
    $self->{trc1_adjustment}->set_value( $value );
    $self->{trc2_adjustment}->set_value( $value );
    $self->{test_run_scroll_lock} = 0;

I see this code being called, and my values being printed. I've also set up some code to dump the current value of each adjustment, and they all appear to be synchronised.

However, the other 2 treeviews never scroll. Why not?

( I realise that the max values of each adjustment may not line up ... in my case, they do ).


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]