GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Fri Aug 22, 2014 3:58 am

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Gtk Scrollbar resize page_size
PostPosted: Mon Jan 07, 2013 10:22 pm 
Offline

Joined: Mon Jan 07, 2013 7:35 am
Posts: 3
Hello,

I create a custom widget which draws a rule whose size varied.
I need to place the widget in a scroll panel.
To improve the user experience I would like to enlarge the area allocated to a widget using the associated scrollbar. Much like Excel.
I create an animated gif in order to understand the operation.

I'm new in the world of Gtk. I need your advice to guide me in achieving this widget.

In a first time, do you think this is possible?
Then, would you have an example, an application example which I can take?
If not, what step should I follow?

My first probleme is : How to know when the scrollbar (slider) is pressed ?
I have wrote :
Code:
g_signal_connect(G_OBJECT(m_hScrollbar), "button-press-event", G_CALLBACK(scrollbar_clicked));

Unfortunately this signal is emitted to the entire surface of the widget(GtkHScrollbar)

In parallel, I tried to connect to the event "move-slider" but without success. Too bad because it looks quite what I need.


PS: I use Gtk+-2.0, and I am running Ubuntu 12 (precise) Unity


Attachments:
custom-scrollbar.gif
custom-scrollbar.gif [ 151.72 KiB | Viewed 759 times ]
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 1 guest


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