GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Sat Nov 29, 2014 8:29 am

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Scroll horizontal GtkIconView with mouse wheel
PostPosted: Sat Dec 31, 2011 11:17 pm 
Offline

Joined: Sat Dec 31, 2011 11:16 pm
Posts: 1
Hello,

Suppose that I have a GtkScrolledWindow witch has a child of class
GtkIconView, the icons are disposed horizontally, then, only an
horizontal scroll bar is showed when there are many icons.

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.

Is there a way to scroll programmatically the GtkIconView the same
amount as when I press the arrow button in the scroll bar?

I know the existence of "gtk_icon_view_scroll_to_path" but I want to
scroll the GtkIconView an amount of pixels, not necessarily to a
specific path.

Thanks in advance!
Regards!


Top
 Profile  
 
 Post subject: Re: Scroll horizontal GtkIconView with mouse wheel
PostPosted: Tue Jan 03, 2012 12:35 am 
Offline
Never Seen the Sunlight

Joined: Thu Mar 24, 2011 2:10 pm
Posts: 328
Location: Sydney, Australia
I don't think you have to go to that much trouble.
If you hover the cursor over the horizontal scrollbar then using the wheel should scroll it back and forth. The principle even works on my trackpad.
I think you should even be able to scroll it when not hovered if you give focus to the scrollbar. As to programmatic movement the amount a scrollbar is moved by is controlled by the gtk_adjustment it inherits.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: Yahoo [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group