Re: Scroll horizontal GtkIconView with mouse wheel

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

 



Hi Damián,

2011/12/31 Damián Nohales <damiannohales@xxxxxxxxx>:
> That I want is to allow that the GtkIconView scroll horizontally with
> the mouse wheel. I can capture the event but I don't know how scroll the
> GtkIconView.

You need to get the horizontal adjustment of the scrolled window, move
the value by the step, and emit value_changed. Something like:

GtkAdjustment *hadj = gtk_scrolled_window_get_hadjustment (swin);
double step = gtk_adjustment_get_page_increment (hadj);
double value = gtk_adjustment_get_value (hadj);
value += step;  // depends on the scroll direction
gtk_adjustment_set_value(hadj, value);

It'd be nice if scrolledwindow handled horizontal scrolling for you,
there's probably a good reason why it doesn't.

John
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list



[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux