Forcing GtkScrolledWindow to sroll
- From: Tim Corio <tcorio rochester rr com>
- To: GTK App Developers List <gtk-app-devel-list gnome org>
- Subject: Forcing GtkScrolledWindow to sroll
- Date: Mon, 11 Jan 2010 13:51:06 -0500
I couldn't find this in the archives, but I assume it's a common thing.
How do I force a GtkScrolledWindow to scroll?
Using the C API, I have a drawing area widget that I put into a scrolled
window. I can scroll the image as expected by dragging the scrollbars.
Now, I want to first, force the viewport to be scrolled to the center of
the image. The I want to implement a "drag" scrolling. The user will
click and drag the image to make it scroll.
In the motion_notify_event I get the pointer position and button states,
and a calculate the amount that the user has dragged the image (deltaX
and deltaY). I assume I can use these two values to tell the scrolled
window to scroll by those amounts, but I can't figure out from the API
how to do this.
I appreciate any help you can give.
Thank You,
Tim
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]